Package io.activej.serializer.stream
Class StreamOutput
java.lang.Object
io.activej.serializer.stream.StreamOutput
- All Implemented Interfaces:
WithInitializer<StreamOutput>,Closeable,AutoCloseable
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]allocate(int size) byte[]array()final voidclose()static StreamOutputcreate(OutputStream output) static StreamOutputcreate(OutputStream outputStream, int bufferSize) voidensure(int bytes) final voidflush()intlimit()out()voidout(BinaryOutput out) intpos()voidpos(int pos) protected voidrecycle(byte[] array) intfinal voidwrite(byte[] b) final voidwrite(byte[] b, int off, int len) final voidwriteBoolean(boolean v) final voidwriteByte(byte v) final voidwriteChar(char v) final voidwriteDouble(double v) final voidwriteFloat(float v) final voidwriteInt(int v) final voidwriteIso88591(@NotNull String s) final voidwriteIso88591Nullable(@Nullable String s) final voidwriteLong(long v) final voidwriteShort(short v) final voidwriteString(@NotNull String s) final voidwriteUTF16(@NotNull String s) final voidwriteUTF16Nullable(@Nullable String s) final voidfinal voidwriteUTF8Nullable(@Nullable String s) final voidwriteVarInt(int v) final voidwriteVarLong(long v) Methods 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
-
out
-
out
-
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
-
allocate
protected byte[] allocate(int size) -
recycle
protected void recycle(byte[] array) -
flush
- Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
writeBoolean
- Throws:
IOException
-
writeByte
- Throws:
IOException
-
writeShort
- Throws:
IOException
-
writeInt
- Throws:
IOException
-
writeLong
- Throws:
IOException
-
writeVarInt
- Throws:
IOException
-
writeVarLong
- Throws:
IOException
-
writeFloat
- Throws:
IOException
-
writeDouble
- Throws:
IOException
-
writeChar
- Throws:
IOException
-
writeString
- Throws:
IOException
-
writeUTF8
- Throws:
IOException
-
writeIso88591
- Throws:
IOException
-
writeUTF16
- Throws:
IOException
-
writeUTF8Nullable
- Throws:
IOException
-
writeIso88591Nullable
- Throws:
IOException
-
writeUTF16Nullable
- Throws:
IOException
-