public class ORecordBytes extends ORecordAbstract implements OBlob
ORecordElement.STATUS
contentChanged, dirty, dirtyManager, recordFormat, recordId, recordVersion, size, source, status
RECORD_TYPE
Constructor and Description |
---|
ORecordBytes() |
ORecordBytes(byte[] iSource) |
ORecordBytes(ODatabaseDocumentInternal iDatabase) |
ORecordBytes(ODatabaseDocumentInternal iDatabase,
byte[] iSource) |
ORecordBytes(ORID iRecordId) |
Modifier and Type | Method and Description |
---|---|
ORecordAbstract |
clear()
All the fields are deleted but the record identity is maintained.
|
ORecordBytes |
copy()
Creates a copy of the record.
|
int |
fromInputStream(InputStream in)
Reads the input stream in memory.
|
int |
fromInputStream(InputStream in,
int maxSize)
Reads the input stream in memory specifying the maximum bytes to read.
|
ORecordBytes |
fromStream(byte[] iRecordBuffer)
Unmarshalls the object.
|
byte |
getRecordType() |
ORecordBytes |
reset(byte[] iSource) |
protected void |
setup(ODatabaseDocumentInternal db) |
void |
toOutputStream(OutputStream out) |
byte[] |
toStream()
Marshalls the object.
|
addIdentityChangeListener, checkForLoading, clearSource, compare, compareTo, copyTo, delete, detach, equals, fill, fill, flatCopy, fromJSON, fromJSON, fromJSON, fromJSON, getDatabase, getDatabaseIfDefined, getDatabaseIfDefinedInternal, getDatabaseInternal, getDirtyManager, getIdentity, getInternalStatus, getOwner, getRecord, getSize, getVersion, hashCode, isContentChanged, isDirty, isLocked, load, lock, lockingStrategy, onAfterIdentityChanged, onBeforeIdentityChanged, reload, reload, reload, reload, removeIdentityChangeListener, reset, save, save, save, save, setContentChanged, setDirty, setDirtyManager, setDirtyNoChanged, setIdentity, setIdentity, setInternalStatus, setVersion, toJSON, toJSON, toJSON, toJSON, toString, track, unload, unlock, unsetDirty, unTrack
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
delete, detach, fromJSON, getDatabase, getIdentity, getInternalStatus, getSize, getVersion, isDirty, load, reload, reload, reset, save, save, save, save, setInternalStatus, toJSON, toJSON, unload
getOwner, setDirty, setDirtyNoChanged
getRecord, isLocked, lock, lockingStrategy, unlock
compareTo
compare, comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public ORecordBytes()
public ORecordBytes(ODatabaseDocumentInternal iDatabase)
public ORecordBytes(ODatabaseDocumentInternal iDatabase, byte[] iSource)
public ORecordBytes(byte[] iSource)
public ORecordBytes(ORID iRecordId)
public ORecordBytes reset(byte[] iSource)
public ORecordBytes copy()
ORecord
public ORecordBytes fromStream(byte[] iRecordBuffer)
OSerializableStream
fromStream
in interface OSerializableStream
fromStream
in class ORecordAbstract
iRecordBuffer
- byte array representation of the objectpublic ORecordAbstract clear()
ORecord
clear
in interface ORecord
clear
in class ORecordAbstract
public byte[] toStream()
OSerializableStream
toStream
in interface OSerializableStream
toStream
in class ORecordAbstract
OSerializableStream.fromStream(byte[])
public byte getRecordType()
getRecordType
in class ORecordAbstract
protected void setup(ODatabaseDocumentInternal db)
setup
in class ORecordAbstract
public int fromInputStream(InputStream in) throws IOException
fromInputStream(InputStream, int)
because allocation is made multiple times. If you already
know the input size use fromInputStream(InputStream, int)
.fromInputStream
in interface OBlob
in
- Input Stream, use buffered input stream wrapper to speed up readingIOException
public int fromInputStream(InputStream in, int maxSize) throws IOException
fromInputStream(InputStream)
because allocation is made only once.fromInputStream
in interface OBlob
in
- Input Stream, use buffered input stream wrapper to speed up readingmaxSize
- Maximum size to readIOException
- if an I/O error occurs.public void toOutputStream(OutputStream out) throws IOException
toOutputStream
in interface OBlob
IOException
Copyright © 2009–2020 OrientDB. All rights reserved.