ariba.util.io
Class SerializeUtil

java.lang.Object
  extended by ariba.util.io.SerializeUtil

public class SerializeUtil
extends java.lang.Object

Utilities useful for Serialization/Externalization.


Field Summary
static java.lang.String ReadBoolean
          constant used by rpc stubgenerator to generate code to call the readBoolean method.
static java.lang.String ReadChar
          constant used by rpc stubgenerator to generate code to call the readChar method.
static java.lang.String ReadFloat
          constant used by rpc stubgenerator to generate code to call the readFloat method.
static java.lang.String ReadInt
          constant used by rpc stubgenerator to generate code to call the readInt method.
static java.lang.String ReadLocale
          constant used by rpc stubgenerator to generate code to call the readLocale method.
static java.lang.String ReadLong
          constant used by rpc stubgenerator to generate code to call the readLong method.
static java.lang.String ReadObject
          constant for calling the readObject method, used by rpc stubgenerator.
static java.lang.String ReadUTF
          constant for calling the readUTF method, used by rpc stubgenerator.
static java.lang.String ResetObjectTable
          Deprecated.  
static java.lang.String WriteBoolean
          constant used by rpc stubgenerator to generate code to call the writeBoolean method.
static java.lang.String WriteChar
          constant used by rpc stubgenerator to generate code to call the writeChar method.
static java.lang.String WriteFloat
          constant used by rpc stubgenerator to generate code to call the writeFloat method.
static java.lang.String WriteInt
          constant used by rpc stubgenerator to generate code to call the writeInt method.
static java.lang.String WriteLocale
          constant used by rpc stubgenerator to generate code to call the writeLocale method.
static java.lang.String WriteLong
          constant used by rpc stubgenerator to generate code to call the writeLong method.
static java.lang.String WriteObject
          constant for calling the writeObject method, used by rpc stubgenerator.
static java.lang.String WriteUTF
          constant for calling the writeUTF method, used by rpc stubgenerator.
 
Method Summary
static java.util.Locale readLocale(java.io.ObjectInput input)
          helper function to read the Locale object during serialization, read back the String from the given input stream.
static java.lang.String readUTF(java.io.ObjectInput input)
          helper function to read a String during serialization.
static void writeLocale(java.io.ObjectOutput output, java.util.Locale locale)
          helper function to write the Locale object during serialization.
static void writeUTF(java.io.ObjectOutput output, java.lang.String str)
          helper function to write a String during serialization.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WriteUTF

public static final java.lang.String WriteUTF
constant for calling the writeUTF method, used by rpc stubgenerator.

See Also:
Constant Field Values

WriteObject

public static final java.lang.String WriteObject
constant for calling the writeObject method, used by rpc stubgenerator.

See Also:
Constant Field Values

WriteInt

public static final java.lang.String WriteInt
constant used by rpc stubgenerator to generate code to call the writeInt method.

See Also:
Constant Field Values

WriteBoolean

public static final java.lang.String WriteBoolean
constant used by rpc stubgenerator to generate code to call the writeBoolean method.

See Also:
Constant Field Values

WriteLong

public static final java.lang.String WriteLong
constant used by rpc stubgenerator to generate code to call the writeLong method.

See Also:
Constant Field Values

WriteFloat

public static final java.lang.String WriteFloat
constant used by rpc stubgenerator to generate code to call the writeFloat method.

See Also:
Constant Field Values

WriteChar

public static final java.lang.String WriteChar
constant used by rpc stubgenerator to generate code to call the writeChar method.

See Also:
Constant Field Values

WriteLocale

public static final java.lang.String WriteLocale
constant used by rpc stubgenerator to generate code to call the writeLocale method.

See Also:
Constant Field Values

ResetObjectTable

public static final java.lang.String ResetObjectTable
Deprecated. 
constant used by rpc stubgenerator to generate code to call the resetObjectTable method.

See Also:
Constant Field Values

ReadObject

public static final java.lang.String ReadObject
constant for calling the readObject method, used by rpc stubgenerator.

See Also:
Constant Field Values

ReadUTF

public static final java.lang.String ReadUTF
constant for calling the readUTF method, used by rpc stubgenerator.

See Also:
Constant Field Values

ReadInt

public static final java.lang.String ReadInt
constant used by rpc stubgenerator to generate code to call the readInt method.

See Also:
Constant Field Values

ReadBoolean

public static final java.lang.String ReadBoolean
constant used by rpc stubgenerator to generate code to call the readBoolean method.

See Also:
Constant Field Values

ReadChar

public static final java.lang.String ReadChar
constant used by rpc stubgenerator to generate code to call the readChar method.

See Also:
Constant Field Values

ReadLong

public static final java.lang.String ReadLong
constant used by rpc stubgenerator to generate code to call the readLong method.

See Also:
Constant Field Values

ReadFloat

public static final java.lang.String ReadFloat
constant used by rpc stubgenerator to generate code to call the readFloat method.

See Also:
Constant Field Values

ReadLocale

public static final java.lang.String ReadLocale
constant used by rpc stubgenerator to generate code to call the readLocale method.

See Also:
Constant Field Values
Method Detail

writeUTF

public static void writeUTF(java.io.ObjectOutput output,
                            java.lang.String str)
                     throws java.io.IOException
helper function to write a String during serialization. We need this because java.io.writeUTF does not accept a null object. So this is a wrapper to handle the null object. Used in conjuction with SerializeUtil.readUTF

Parameters:
output - the object output stream to write the String. Cannot be null.
str - the String object to serialize.
Throws:
java.io.IOException - I/O error occurred while writing to output
See Also:
readUTF(java.io.ObjectInput)

readUTF

public static java.lang.String readUTF(java.io.ObjectInput input)
                                throws java.io.IOException
helper function to read a String during serialization. We need this because java.io.writeUTF does not accept a null object. So this is a wrapper to handle the null object. Used in conjuction with SerializeUtil.writeUTF

Parameters:
input - the object input stream to read the String. Cannot be null.
Returns:
the String read.
Throws:
java.io.IOException - I/O error occurred while reading from input

writeLocale

public static void writeLocale(java.io.ObjectOutput output,
                               java.util.Locale locale)
                        throws java.io.IOException
helper function to write the Locale object during serialization. Actually, only the String returned by the Locale.toString method is serialized.

Parameters:
output - the ObjectOutput stream to write out the Locale object. Cannot be null.
locale - the Locale object to write, okay to be null.
Throws:
java.io.IOException - throws IOException if the write fails.
See Also:
readLocale(java.io.ObjectInput)

readLocale

public static java.util.Locale readLocale(java.io.ObjectInput input)
                                   throws java.io.IOException
helper function to read the Locale object during serialization, read back the String from the given input stream.

Parameters:
input - the ObjectInput stream to read from, cannot be null.
Returns:
the Locale object corresponding to the String read.
Throws:
java.io.IOException - throws IOException if the read fails.
See Also:
writeLocale(java.io.ObjectOutput, java.util.Locale)


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.