Package io.activej.serializer.stream
Class StreamInput
java.lang.Object
io.activej.serializer.stream.StreamInput
- All Implemented Interfaces:
WithInitializer<StreamInput>,Closeable,AutoCloseable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]allocate(int size) byte[]array()final voidclose()static StreamInputcreate(InputStream inputStream) static StreamInputcreate(InputStream inputStream, int bufferSize) voidensure(int bytes) in()voidin(BinaryInput in) final booleanintlimit()intpos()voidpos(int pos) final intread(byte[] b) final intread(byte[] b, int off, int len) final booleanfinal bytereadByte()final charreadChar()final doublefinal floatfinal intreadInt()final @NotNull Stringfinal @Nullable Stringfinal longreadLong()final shortfinal @NotNull Stringfinal @NotNull Stringfinal @Nullable Stringfinal @NotNull StringreadUTF8()final @Nullable Stringfinal intfinal longprotected voidrecycle(byte[] array) intMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.activej.codegen.util.WithInitializer
withInitializer, withInitializer
-
Field Details
-
DEFAULT_BUFFER_SIZE
public static final int DEFAULT_BUFFER_SIZE- See Also:
-
-
Method Details
-
create
-
create
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
allocate
protected byte[] allocate(int size) -
recycle
protected void recycle(byte[] array) -
in
-
in
-
array
public byte[] array() -
pos
public int pos() -
pos
public void pos(int pos) -
limit
public int limit() -
remaining
public int remaining() -
ensure
- Throws:
IOException
-
isEndOfStream
- Throws:
IOException
-
read
- Throws:
IOException
-
read
- Throws:
IOException
-
readByte
- Throws:
IOException
-
readBoolean
- Throws:
IOException
-
readShort
- Throws:
IOException
-
readInt
- Throws:
IOException
-
readLong
- Throws:
IOException
-
readVarInt
- Throws:
IOException
-
readVarLong
- Throws:
IOException
-
readFloat
- Throws:
IOException
-
readDouble
- Throws:
IOException
-
readChar
- Throws:
IOException
-
readString
- Throws:
IOException
-
readUTF8
- Throws:
IOException
-
readIso88591
- Throws:
IOException
-
readUTF16
- Throws:
IOException
-
readUTF8Nullable
- Throws:
IOException
-
readIso88591Nullable
- Throws:
IOException
-
readUTF16Nullable
- Throws:
IOException
-