Package io.protostuff
Enum Class WriteSink
- All Implemented Interfaces:
Serializable
,Comparable<WriteSink>
,Constable
The flexible output for outputs that use
WriteSession
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract LinkedBuffer
drain
(WriteSession session, LinkedBuffer lb) static WriteSink
Returns the enum constant of this class with the specified name.static WriteSink[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.abstract LinkedBuffer
writeByte
(byte value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeByteArray
(byte[] value, int offset, int length, WriteSession session, LinkedBuffer lb) final LinkedBuffer
writeByteArray
(byte[] value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeByteArrayB64
(byte[] value, int offset, int length, WriteSession session, LinkedBuffer lb) final LinkedBuffer
writeByteArrayB64
(byte[] value, WriteSession session, LinkedBuffer lb) final LinkedBuffer
writeDouble
(double value, WriteSession session, LinkedBuffer lb) final LinkedBuffer
writeDoubleLE
(double value, WriteSession session, LinkedBuffer lb) final LinkedBuffer
writeFloat
(float value, WriteSession session, LinkedBuffer lb) final LinkedBuffer
writeFloatLE
(float value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeInt16
(int value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeInt16LE
(int value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeInt32
(int value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeInt32LE
(int value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeInt64
(long value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeInt64LE
(long value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrAscii
(CharSequence value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrFromDouble
(double value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrFromFloat
(float value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrFromInt
(int value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrFromLong
(long value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrUTF8
(CharSequence value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrUTF8FixedDelimited
(CharSequence value, boolean littleEndian, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeStrUTF8VarDelimited
(CharSequence value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeVarInt32
(int value, WriteSession session, LinkedBuffer lb) abstract LinkedBuffer
writeVarInt64
(long value, WriteSession session, LinkedBuffer lb)
-
Enum Constant Details
-
BUFFERED
-
STREAMED
-
-
Constructor Details
-
WriteSink
private WriteSink()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
drain
- Throws:
IOException
-
writeByteArrayB64
public final LinkedBuffer writeByteArrayB64(byte[] value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeByteArrayB64
public abstract LinkedBuffer writeByteArrayB64(byte[] value, int offset, int length, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeByteArray
public final LinkedBuffer writeByteArray(byte[] value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeByteArray
public abstract LinkedBuffer writeByteArray(byte[] value, int offset, int length, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeByte
public abstract LinkedBuffer writeByte(byte value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeInt32
public abstract LinkedBuffer writeInt32(int value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeInt64
public abstract LinkedBuffer writeInt64(long value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeFloat
public final LinkedBuffer writeFloat(float value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeDouble
public final LinkedBuffer writeDouble(double value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeInt16
public abstract LinkedBuffer writeInt16(int value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeInt16LE
public abstract LinkedBuffer writeInt16LE(int value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeInt32LE
public abstract LinkedBuffer writeInt32LE(int value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeInt64LE
public abstract LinkedBuffer writeInt64LE(long value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeFloatLE
public final LinkedBuffer writeFloatLE(float value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeDoubleLE
public final LinkedBuffer writeDoubleLE(double value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeVarInt32
public abstract LinkedBuffer writeVarInt32(int value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeVarInt64
public abstract LinkedBuffer writeVarInt64(long value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrFromInt
public abstract LinkedBuffer writeStrFromInt(int value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrFromLong
public abstract LinkedBuffer writeStrFromLong(long value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrFromFloat
public abstract LinkedBuffer writeStrFromFloat(float value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrFromDouble
public abstract LinkedBuffer writeStrFromDouble(double value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrAscii
public abstract LinkedBuffer writeStrAscii(CharSequence value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrUTF8
public abstract LinkedBuffer writeStrUTF8(CharSequence value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrUTF8VarDelimited
public abstract LinkedBuffer writeStrUTF8VarDelimited(CharSequence value, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-
writeStrUTF8FixedDelimited
public abstract LinkedBuffer writeStrUTF8FixedDelimited(CharSequence value, boolean littleEndian, WriteSession session, LinkedBuffer lb) throws IOException - Throws:
IOException
-