public final class SimpleReadableMedia extends Object implements ReadableMedia
ReadableMedia interface.
This class is not thread safe.
Created by Y.Kiselev on 01.09.2016.
| Constructor and Description |
|---|
SimpleReadableMedia(BinaryInput input,
UserTypeInput userTypeInput)
Main ctor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
readBoolean() |
byte |
readByte() |
byte[] |
readByteArray() |
char |
readChar() |
char[] |
readCharArray() |
double |
readDouble() |
double[] |
readDoubleArray() |
float |
readFloat() |
float[] |
readFloatArray() |
int |
readInt() |
int[] |
readIntArray() |
long |
readLong() |
long[] |
readLongArray() |
<T> T |
readObject(Class<T> clazz) |
<T> T[] |
readObjectArray(Class<T> itemType) |
int |
readPackedInteger()
Reads packed positive integer (1-5 bytes)
|
void |
readRest(BinaryOutput output,
ArrayFactory arrayFactory)
Reads the rest of user object data till the end marker.
|
short |
readShort() |
short[] |
readShortArray() |
String |
readString() |
public SimpleReadableMedia(BinaryInput input, UserTypeInput userTypeInput)
input - the input to read fromuserTypeInput - the input to read user types frompublic int readPackedInteger()
throws IOException
ReadableMediareadPackedInteger in interface ReadableMediaIOExceptionpublic String readString() throws IOException
readString in interface ReadableMediaIOExceptionpublic byte readByte()
throws IOException
readByte in interface ReadableMediaIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface ReadableMediaIOExceptionpublic char readChar()
throws IOException
readChar in interface ReadableMediaIOExceptionpublic short readShort()
throws IOException
readShort in interface ReadableMediaIOExceptionpublic int readInt()
throws IOException
readInt in interface ReadableMediaIOExceptionpublic long readLong()
throws IOException
readLong in interface ReadableMediaIOExceptionpublic float readFloat()
throws IOException
readFloat in interface ReadableMediaIOExceptionpublic double readDouble()
throws IOException
readDouble in interface ReadableMediaIOExceptionpublic <T> T readObject(Class<T> clazz) throws IOException
readObject in interface ReadableMediaIOExceptionpublic byte[] readByteArray()
throws IOException
readByteArray in interface ReadableMediaIOExceptionpublic char[] readCharArray()
throws IOException
readCharArray in interface ReadableMediaIOExceptionpublic short[] readShortArray()
throws IOException
readShortArray in interface ReadableMediaIOExceptionpublic int[] readIntArray()
throws IOException
readIntArray in interface ReadableMediaIOExceptionpublic long[] readLongArray()
throws IOException
readLongArray in interface ReadableMediaIOExceptionpublic float[] readFloatArray()
throws IOException
readFloatArray in interface ReadableMediaIOExceptionpublic double[] readDoubleArray()
throws IOException
readDoubleArray in interface ReadableMediaIOExceptionpublic <T> T[] readObjectArray(Class<T> itemType) throws IOException
readObjectArray in interface ReadableMediaIOExceptionpublic void readRest(BinaryOutput output, ArrayFactory arrayFactory) throws IOException
ReadableMediaUserTypeInput.read(ReadableMedia, Class) i.e. after user type marker is extracted from input.
This method is designed to support multi-versioned object binaries.readRest in interface ReadableMediaoutput - the output to write rest of object bytes to.arrayFactory - the array factory for temporal buffers creation.IOException - if reading error occurred (like end of stream, etc).Copyright © 2016. All rights reserved.