com.dyuproject.protostuff
Enum WriteSink

java.lang.Object
  extended by java.lang.Enum<WriteSink>
      extended by com.dyuproject.protostuff.WriteSink
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<WriteSink>

public enum WriteSink
extends java.lang.Enum<WriteSink>

The flexible output for outputs that use WriteSession.

Author:
David Yu
Date created:
Sep 20, 2010

Enum Constant Summary
BUFFERED
           
STREAMED
           
 
Method Summary
abstract  LinkedBuffer drain(WriteSession session, LinkedBuffer lb)
           
static WriteSink valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static WriteSink[] values()
          Returns an array containing the constants of this enum type, 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)
           
 LinkedBuffer writeByteArray(byte[] value, WriteSession session, LinkedBuffer lb)
           
abstract  LinkedBuffer writeByteArrayB64(byte[] value, int offset, int length, WriteSession session, LinkedBuffer lb)
           
 LinkedBuffer writeByteArrayB64(byte[] value, WriteSession session, LinkedBuffer lb)
           
 LinkedBuffer writeDouble(double value, WriteSession session, LinkedBuffer lb)
           
 LinkedBuffer writeDoubleLE(double value, WriteSession session, LinkedBuffer lb)
           
 LinkedBuffer writeFloat(float value, WriteSession session, LinkedBuffer lb)
           
 LinkedBuffer writeFloatLE(float 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(java.lang.String 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(java.lang.String value, WriteSession session, LinkedBuffer lb)
           
abstract  LinkedBuffer writeStrUTF8FixedDelimited(java.lang.String value, boolean littleEndian, WriteSession session, LinkedBuffer lb)
           
abstract  LinkedBuffer writeStrUTF8VarDelimited(java.lang.String value, WriteSession session, LinkedBuffer lb)
           
abstract  LinkedBuffer writeVarInt32(int value, WriteSession session, LinkedBuffer lb)
           
abstract  LinkedBuffer writeVarInt64(long value, WriteSession session, LinkedBuffer lb)
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BUFFERED

public static final WriteSink BUFFERED

STREAMED

public static final WriteSink STREAMED
Method Detail

values

public static WriteSink[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (WriteSink c : WriteSink.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static WriteSink valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

drain

public abstract LinkedBuffer drain(WriteSession session,
                                   LinkedBuffer lb)
                            throws java.io.IOException
Throws:
java.io.IOException

writeByteArrayB64

public final LinkedBuffer writeByteArrayB64(byte[] value,
                                            WriteSession session,
                                            LinkedBuffer lb)
                                     throws java.io.IOException
Throws:
java.io.IOException

writeByteArrayB64

public abstract LinkedBuffer writeByteArrayB64(byte[] value,
                                               int offset,
                                               int length,
                                               WriteSession session,
                                               LinkedBuffer lb)
                                        throws java.io.IOException
Throws:
java.io.IOException

writeByteArray

public final LinkedBuffer writeByteArray(byte[] value,
                                         WriteSession session,
                                         LinkedBuffer lb)
                                  throws java.io.IOException
Throws:
java.io.IOException

writeByteArray

public abstract LinkedBuffer writeByteArray(byte[] value,
                                            int offset,
                                            int length,
                                            WriteSession session,
                                            LinkedBuffer lb)
                                     throws java.io.IOException
Throws:
java.io.IOException

writeByte

public abstract LinkedBuffer writeByte(byte value,
                                       WriteSession session,
                                       LinkedBuffer lb)
                                throws java.io.IOException
Throws:
java.io.IOException

writeInt32

public abstract LinkedBuffer writeInt32(int value,
                                        WriteSession session,
                                        LinkedBuffer lb)
                                 throws java.io.IOException
Throws:
java.io.IOException

writeInt64

public abstract LinkedBuffer writeInt64(long value,
                                        WriteSession session,
                                        LinkedBuffer lb)
                                 throws java.io.IOException
Throws:
java.io.IOException

writeFloat

public final LinkedBuffer writeFloat(float value,
                                     WriteSession session,
                                     LinkedBuffer lb)
                              throws java.io.IOException
Throws:
java.io.IOException

writeDouble

public final LinkedBuffer writeDouble(double value,
                                      WriteSession session,
                                      LinkedBuffer lb)
                               throws java.io.IOException
Throws:
java.io.IOException

writeInt32LE

public abstract LinkedBuffer writeInt32LE(int value,
                                          WriteSession session,
                                          LinkedBuffer lb)
                                   throws java.io.IOException
Throws:
java.io.IOException

writeInt64LE

public abstract LinkedBuffer writeInt64LE(long value,
                                          WriteSession session,
                                          LinkedBuffer lb)
                                   throws java.io.IOException
Throws:
java.io.IOException

writeFloatLE

public final LinkedBuffer writeFloatLE(float value,
                                       WriteSession session,
                                       LinkedBuffer lb)
                                throws java.io.IOException
Throws:
java.io.IOException

writeDoubleLE

public final LinkedBuffer writeDoubleLE(double value,
                                        WriteSession session,
                                        LinkedBuffer lb)
                                 throws java.io.IOException
Throws:
java.io.IOException

writeVarInt32

public abstract LinkedBuffer writeVarInt32(int value,
                                           WriteSession session,
                                           LinkedBuffer lb)
                                    throws java.io.IOException
Throws:
java.io.IOException

writeVarInt64

public abstract LinkedBuffer writeVarInt64(long value,
                                           WriteSession session,
                                           LinkedBuffer lb)
                                    throws java.io.IOException
Throws:
java.io.IOException

writeStrFromInt

public abstract LinkedBuffer writeStrFromInt(int value,
                                             WriteSession session,
                                             LinkedBuffer lb)
                                      throws java.io.IOException
Throws:
java.io.IOException

writeStrFromLong

public abstract LinkedBuffer writeStrFromLong(long value,
                                              WriteSession session,
                                              LinkedBuffer lb)
                                       throws java.io.IOException
Throws:
java.io.IOException

writeStrFromFloat

public abstract LinkedBuffer writeStrFromFloat(float value,
                                               WriteSession session,
                                               LinkedBuffer lb)
                                        throws java.io.IOException
Throws:
java.io.IOException

writeStrFromDouble

public abstract LinkedBuffer writeStrFromDouble(double value,
                                                WriteSession session,
                                                LinkedBuffer lb)
                                         throws java.io.IOException
Throws:
java.io.IOException

writeStrAscii

public abstract LinkedBuffer writeStrAscii(java.lang.String value,
                                           WriteSession session,
                                           LinkedBuffer lb)
                                    throws java.io.IOException
Throws:
java.io.IOException

writeStrUTF8

public abstract LinkedBuffer writeStrUTF8(java.lang.String value,
                                          WriteSession session,
                                          LinkedBuffer lb)
                                   throws java.io.IOException
Throws:
java.io.IOException

writeStrUTF8VarDelimited

public abstract LinkedBuffer writeStrUTF8VarDelimited(java.lang.String value,
                                                      WriteSession session,
                                                      LinkedBuffer lb)
                                               throws java.io.IOException
Throws:
java.io.IOException

writeStrUTF8FixedDelimited

public abstract LinkedBuffer writeStrUTF8FixedDelimited(java.lang.String value,
                                                        boolean littleEndian,
                                                        WriteSession session,
                                                        LinkedBuffer lb)
                                                 throws java.io.IOException
Throws:
java.io.IOException


Copyright © 2009-2013. All Rights Reserved.