public class CompactObjectInput extends java.lang.Object implements java.io.Closeable, java.io.ObjectInput, ObjectDataInputI, DigestingBLOBInputI, SecureObjectInputI, SidebandHandlerI
| Constructor and Description |
|---|
CompactObjectInput(java.io.InputStream _in)
Creates a CompactObjectInput that reads from the specified DataInput.
|
CompactObjectInput(java.io.InputStream _in,
SchemaI schema) |
CompactObjectInput(java.io.InputStream _in,
SchemaI schema,
java.util.function.Function replaceBoAfterRead) |
CompactObjectInput(java.io.InputStream _in,
SchemaI schema,
java.util.function.Function replaceBoAfterRead,
SidebandHandlerI _sidebandHandler) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
_readBLOB(byte[] buffer,
int off,
int len) |
int |
available()
Returns the number of bytes that can be read without blocking.
|
void |
close()
Closes this CompactObjectInput and releases any system resources associated with it.
|
void |
handleSideband() |
int |
read()
Reads a byte of data.
|
int |
read(byte[] b)
Reads into an array of bytes.
|
int |
read(byte[] b,
int off,
int len)
Reads into an array of bytes.
|
java.math.BigDecimal |
readBigDecimal()
Reads a BigDecimal object from our DataInput.
|
byte[] |
readBLOB()
Reads a byte-array from our DataInput and returns it.
|
int |
readBLOB(byte[] buffer,
int off,
int len)
Reads a chunk of $size bytes into the given byte array $buffer, starting at offset $off.
|
int |
readBLOB(java.io.DataOutput out)
Reads bytes from our DataInput and writes them to the passed DataOutput os.
|
int |
readBLOB(java.io.DataOutput out,
java.security.MessageDigest digester) |
int |
readBLOB(java.io.OutputStream out)
Reads bytes from our DataInput and writes them to the passed OutputStream os.
|
int |
readBLOB(java.io.OutputStream out,
java.security.MessageDigest digester) |
boolean |
readBoolean()
Reads one input byte and returns true if that byte is nonzero, false if that byte is zero.
|
java.lang.Boolean |
readBooleanObject()
Reads a Boolean object from our DataInput.
|
byte |
readByte()
Reads and returns one input byte.
|
java.lang.Byte |
readByteObject()
Reads a Byte object from our DataInput.
|
char |
readChar()
Reads two input bytes and returns a char value.
|
java.util.Date |
readDate()
Reads a Date from our DataInput.
|
double |
readDouble()
Reads eight input bytes and returns a double value.
|
java.lang.Double |
readDoubleObject()
Reads a Double object from our DataInput.
|
float |
readFloat()
Reads four input bytes and returns a float value.
|
java.lang.Float |
readFloatObject()
Reads a Float object from our DataInput.
|
void |
readFully(byte[] b)
Reads some bytes from our DataInput and stores them into the buffer array b.
|
void |
readFully(byte[] b,
int off,
int len)
Reads len bytes our DataInput.
|
int |
readInt()
Reads four input bytes and returns an int value.
|
int[] |
readIntegerArray()
Reads an int array from our DataInput.
|
java.lang.Integer |
readIntegerObject()
Reads a Integer object from our DataInput.
|
java.lang.String |
readLine()
Reads the next line of text from our DataInput.
|
long |
readLong()
Reads eight input bytes and returns a long value.
|
long[] |
readLongArray()
Reads a long array from our DataInput.
|
java.lang.Long |
readLongObject()
Reads a Long object from our DataInput.
|
java.lang.Object |
readObject()
Read and return an object.
|
java.lang.Object |
readObject(java.lang.Class[] expectedClasses)
Reads an Object from our DataInput, expecting an object of one of the given classes.
|
java.lang.Object[] |
readObjectArray()
Reads an Object array from our DataInput.
|
short |
readShort()
Reads two input bytes and returns a short value.
|
java.lang.Short |
readShortObject()
Reads a Short object from our DataInput.
|
java.lang.String |
readString()
Reads a UTF-8 string from our DataInput.
|
java.lang.String[] |
readStringArray()
Reads a String array from our DataInput.
|
int |
readUnsignedByte()
Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255.
|
int |
readUnsignedShort()
Reads two input bytes and returns an int value in the range 0 through 65535.
|
java.lang.String |
readUTF()
Reads in a string that has been encoded using a modified UTF-8 format.
|
CompactObjectInput |
setBlocksize(int b)
Sets the blocksize for data-transfer to the passed value in bytes.
|
void |
setObjectTransferHandler(ObjectTransferHandlerI _objectTransferHandler)
Sets the ObjectTransferHandlerI for this class.
|
void |
setSidebandHandler(SidebandHandlerI sbh)
Sets the SidebandHandlerI for this class.
|
long |
skip(long n)
Skips n bytes of input.
|
int |
skipBytes(int n)
Makes an attempt to skip over n bytes of data from our DataInput, discarding the skipped bytes.
|
public CompactObjectInput(java.io.InputStream _in)
public CompactObjectInput(java.io.InputStream _in,
SchemaI schema)
public CompactObjectInput(java.io.InputStream _in,
SchemaI schema,
java.util.function.Function replaceBoAfterRead)
public CompactObjectInput(java.io.InputStream _in,
SchemaI schema,
java.util.function.Function replaceBoAfterRead,
SidebandHandlerI _sidebandHandler)
public CompactObjectInput setBlocksize(int b)
public void setSidebandHandler(SidebandHandlerI sbh)
public void setObjectTransferHandler(ObjectTransferHandlerI _objectTransferHandler)
public void handleSideband()
throws java.io.IOException
handleSideband in interface SidebandHandlerIjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.io.ObjectInputclose in interface java.lang.AutoCloseablejava.io.IOExceptionpublic boolean readBoolean()
throws java.io.IOException
readBoolean in interface java.io.DataInputjava.io.IOExceptionpublic byte readByte()
throws java.io.IOException
readByte in interface java.io.DataInputjava.io.IOExceptionpublic char readChar()
throws java.io.IOException
readChar in interface java.io.DataInputjava.io.IOExceptionpublic double readDouble()
throws java.io.IOException
readDouble in interface java.io.DataInputjava.io.IOExceptionpublic float readFloat()
throws java.io.IOException
readFloat in interface java.io.DataInputjava.io.IOExceptionpublic void readFully(byte[] b)
readFully in interface java.io.DataInputpublic void readFully(byte[] b,
int off,
int len)
readFully in interface java.io.DataInputpublic java.lang.String readLine()
throws java.io.IOException
readLine in interface java.io.DataInputjava.io.IOExceptionpublic long readLong()
throws java.io.IOException
readLong in interface java.io.DataInputjava.io.IOExceptionpublic int readInt()
throws java.io.IOException
readInt in interface java.io.DataInputjava.io.IOExceptionpublic short readShort()
throws java.io.IOException
readShort in interface java.io.DataInputjava.io.IOExceptionpublic int readUnsignedByte()
throws java.io.IOException
readUnsignedByte in interface java.io.DataInputjava.io.IOExceptionpublic int readUnsignedShort()
throws java.io.IOException
readUnsignedShort in interface java.io.DataInputjava.io.IOExceptionpublic java.lang.String readUTF()
throws java.io.IOException
readUTF in interface java.io.DataInputjava.io.IOExceptionpublic int skipBytes(int n)
skipBytes in interface java.io.DataInputpublic java.lang.Boolean readBooleanObject()
throws java.io.IOException
ObjectDataInputIreadBooleanObject in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.Byte readByteObject()
throws java.io.IOException
ObjectDataInputIreadByteObject in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.Double readDoubleObject()
throws java.io.IOException
ObjectDataInputIreadDoubleObject in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.Float readFloatObject()
throws java.io.IOException
ObjectDataInputIreadFloatObject in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.Integer readIntegerObject()
throws java.io.IOException
ObjectDataInputIreadIntegerObject in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.Long readLongObject()
throws java.io.IOException
ObjectDataInputIreadLongObject in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.Short readShortObject()
throws java.io.IOException
ObjectDataInputIreadShortObject in interface ObjectDataInputIjava.io.IOExceptionpublic java.math.BigDecimal readBigDecimal()
throws java.io.IOException
ObjectDataInputIreadBigDecimal in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.String readString()
throws java.io.IOException
ObjectDataInputIreadString in interface ObjectDataInputIjava.io.IOExceptionpublic java.util.Date readDate()
throws java.io.IOException
ObjectDataInputIreadDate in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.String[] readStringArray()
throws java.io.IOException
ObjectDataInputIreadStringArray in interface ObjectDataInputIjava.io.IOExceptionpublic int[] readIntegerArray()
throws java.io.IOException
ObjectDataInputIreadIntegerArray in interface ObjectDataInputIjava.io.IOExceptionpublic long[] readLongArray()
throws java.io.IOException
ObjectDataInputIreadLongArray in interface ObjectDataInputIjava.io.IOExceptionpublic java.lang.Object[] readObjectArray()
throws java.io.IOException
ObjectDataInputIreadObjectArray in interface ObjectDataInputIjava.io.IOExceptionpublic byte[] readBLOB()
throws java.io.IOException
BLOBInputIreadBLOB in interface BLOBInputIjava.io.IOExceptionpublic int readBLOB(byte[] buffer,
int off,
int len)
throws java.io.IOException
IOException - if the number of bytes written into correponding CompactObjectOutput != lenpublic byte[] _readBLOB(byte[] buffer,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic int readBLOB(java.io.DataOutput out)
throws java.io.IOException
BLOBInputIreadBLOB in interface BLOBInputIjava.io.IOExceptionpublic int readBLOB(java.io.DataOutput out,
java.security.MessageDigest digester)
throws java.io.IOException
readBLOB in interface DigestingBLOBInputIjava.io.IOExceptionpublic int readBLOB(java.io.OutputStream out)
throws java.io.IOException
BLOBInputIreadBLOB in interface BLOBInputIjava.io.IOExceptionpublic int readBLOB(java.io.OutputStream out,
java.security.MessageDigest digester)
throws java.io.IOException
readBLOB in interface DigestingBLOBInputIjava.io.IOExceptionpublic int available()
throws java.io.IOException
available in interface java.io.ObjectInputjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in interface java.io.ObjectInputjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in interface java.io.ObjectInputjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in interface java.io.ObjectInputjava.io.IOExceptionpublic java.lang.Object readObject()
throws java.io.IOException
readObject in interface ObjectDataInputIreadObject in interface java.io.ObjectInputjava.io.IOExceptionpublic java.lang.Object readObject(java.lang.Class[] expectedClasses)
throws java.io.IOException
ObjectDataInputIreadObject in interface ObjectDataInputIjava.io.IOExceptionpublic long skip(long n)
skip in interface java.io.ObjectInputCopyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.