org.apache.wicket.util.io
Class WicketObjectInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by java.io.ObjectInputStream
          extended by org.apache.wicket.util.io.WicketObjectInputStream
All Implemented Interfaces:
java.io.Closeable, java.io.DataInput, java.io.ObjectInput, java.io.ObjectStreamConstants

public final class WicketObjectInputStream
extends java.io.ObjectInputStream

Author:
jcompagner

Nested Class Summary
 
Nested classes/interfaces inherited from class java.io.ObjectInputStream
java.io.ObjectInputStream.GetField
 
Field Summary
 
Fields inherited from interface java.io.ObjectStreamConstants
baseWireHandle, PROTOCOL_VERSION_1, PROTOCOL_VERSION_2, SC_BLOCK_DATA, SC_ENUM, SC_EXTERNALIZABLE, SC_SERIALIZABLE, SC_WRITE_METHOD, STREAM_MAGIC, STREAM_VERSION, SUBCLASS_IMPLEMENTATION_PERMISSION, SUBSTITUTION_PERMISSION, TC_ARRAY, TC_BASE, TC_BLOCKDATA, TC_BLOCKDATALONG, TC_CLASS, TC_CLASSDESC, TC_ENDBLOCKDATA, TC_ENUM, TC_EXCEPTION, TC_LONGSTRING, TC_MAX, TC_NULL, TC_OBJECT, TC_PROXYCLASSDESC, TC_REFERENCE, TC_RESET, TC_STRING
 
Constructor Summary
WicketObjectInputStream(java.io.InputStream in)
          Construct.
 
Method Summary
 void close()
           
 void defaultReadObject()
           
 int read()
           
 int read(byte[] b)
           
 int read(byte[] buf, int off, int len)
           
 boolean readBoolean()
          Reads in a boolean.
 byte readByte()
          Reads an 8 bit byte.
 char readChar()
          Reads a 16 bit char.
 double readDouble()
          Reads a 64 bit double.
 java.io.ObjectInputStream.GetField readFields()
           
 float readFloat()
          Reads a 32 bit float.
 void readFully(byte[] buf)
          Reads bytes, blocking until all bytes are read.
 void readFully(byte[] buf, int off, int len)
          Reads bytes, blocking until all bytes are read.
 int readInt()
          Reads a 32 bit int.
 long readLong()
          Reads a 64 bit long.
protected  java.lang.Object readObjectOverride()
           
 short readShort()
          Reads a 16 bit short.
 int readUnsignedByte()
          Reads an unsigned 8 bit byte.
 int readUnsignedShort()
          Reads an unsigned 16 bit short.
 java.lang.String readUTF()
           
 
Methods inherited from class java.io.ObjectInputStream
available, enableResolveObject, readClassDescriptor, readLine, readObject, readStreamHeader, readUnshared, registerValidation, resolveClass, resolveObject, resolveProxyClass, skipBytes
 
Methods inherited from class java.io.InputStream
mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.io.ObjectInput
skip
 

Constructor Detail

WicketObjectInputStream

public WicketObjectInputStream(java.io.InputStream in)
                        throws java.io.IOException
Construct.

Parameters:
in -
Throws:
java.io.IOException
Method Detail

readObjectOverride

protected java.lang.Object readObjectOverride()
                                       throws java.io.IOException,
                                              java.lang.ClassNotFoundException
Overrides:
readObjectOverride in class java.io.ObjectInputStream
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
ObjectInputStream.readObjectOverride()

defaultReadObject

public void defaultReadObject()
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
Overrides:
defaultReadObject in class java.io.ObjectInputStream
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
ObjectInputStream.defaultReadObject()

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Specified by:
close in interface java.io.ObjectInput
Overrides:
close in class java.io.ObjectInputStream
Throws:
java.io.IOException
See Also:
ObjectInputStream.close()

readBoolean

public boolean readBoolean()
                    throws java.io.IOException
Reads in a boolean.

Specified by:
readBoolean in interface java.io.DataInput
Overrides:
readBoolean in class java.io.ObjectInputStream
Returns:
the boolean read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readByte

public byte readByte()
              throws java.io.IOException
Reads an 8 bit byte.

Specified by:
readByte in interface java.io.DataInput
Overrides:
readByte in class java.io.ObjectInputStream
Returns:
the 8 bit byte read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readUnsignedByte

public int readUnsignedByte()
                     throws java.io.IOException
Reads an unsigned 8 bit byte.

Specified by:
readUnsignedByte in interface java.io.DataInput
Overrides:
readUnsignedByte in class java.io.ObjectInputStream
Returns:
the 8 bit byte read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readChar

public char readChar()
              throws java.io.IOException
Reads a 16 bit char.

Specified by:
readChar in interface java.io.DataInput
Overrides:
readChar in class java.io.ObjectInputStream
Returns:
the 16 bit char read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readShort

public short readShort()
                throws java.io.IOException
Reads a 16 bit short.

Specified by:
readShort in interface java.io.DataInput
Overrides:
readShort in class java.io.ObjectInputStream
Returns:
the 16 bit short read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readUnsignedShort

public int readUnsignedShort()
                      throws java.io.IOException
Reads an unsigned 16 bit short.

Specified by:
readUnsignedShort in interface java.io.DataInput
Overrides:
readUnsignedShort in class java.io.ObjectInputStream
Returns:
the 16 bit short read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readInt

public int readInt()
            throws java.io.IOException
Reads a 32 bit int.

Specified by:
readInt in interface java.io.DataInput
Overrides:
readInt in class java.io.ObjectInputStream
Returns:
the 32 bit integer read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readLong

public long readLong()
              throws java.io.IOException
Reads a 64 bit long.

Specified by:
readLong in interface java.io.DataInput
Overrides:
readLong in class java.io.ObjectInputStream
Returns:
the read 64 bit long.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readFloat

public float readFloat()
                throws java.io.IOException
Reads a 32 bit float.

Specified by:
readFloat in interface java.io.DataInput
Overrides:
readFloat in class java.io.ObjectInputStream
Returns:
the 32 bit float read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readDouble

public double readDouble()
                  throws java.io.IOException
Reads a 64 bit double.

Specified by:
readDouble in interface java.io.DataInput
Overrides:
readDouble in class java.io.ObjectInputStream
Returns:
the 64 bit double read.
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readFully

public void readFully(byte[] buf)
               throws java.io.IOException
Reads bytes, blocking until all bytes are read.

Specified by:
readFully in interface java.io.DataInput
Overrides:
readFully in class java.io.ObjectInputStream
Parameters:
buf - the buffer into which the data is read
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readFully

public void readFully(byte[] buf,
                      int off,
                      int len)
               throws java.io.IOException
Reads bytes, blocking until all bytes are read.

Specified by:
readFully in interface java.io.DataInput
Overrides:
readFully in class java.io.ObjectInputStream
Parameters:
buf - the buffer into which the data is read
off - the start offset of the data
len - the maximum number of bytes to read
Throws:
java.io.EOFException - If end of file is reached.
java.io.IOException - If other I/O error has occurred.

readUTF

public java.lang.String readUTF()
                         throws java.io.IOException
Specified by:
readUTF in interface java.io.DataInput
Overrides:
readUTF in class java.io.ObjectInputStream
Throws:
java.io.IOException
See Also:
ObjectInputStream.readUTF()

read

public int read()
         throws java.io.IOException
Specified by:
read in interface java.io.ObjectInput
Overrides:
read in class java.io.ObjectInputStream
Throws:
java.io.IOException
See Also:
ObjectInputStream.read()

read

public int read(byte[] b)
         throws java.io.IOException
Specified by:
read in interface java.io.ObjectInput
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException
See Also:
InputStream.read(byte[])

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
Specified by:
read in interface java.io.ObjectInput
Overrides:
read in class java.io.ObjectInputStream
Throws:
java.io.IOException
See Also:
ObjectInputStream.read(byte[], int, int)

readFields

public java.io.ObjectInputStream.GetField readFields()
                                              throws java.io.IOException,
                                                     java.lang.ClassNotFoundException
Overrides:
readFields in class java.io.ObjectInputStream
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
ObjectInputStream.readFields()


Copyright © 2004-2010 Apache Software Foundation. All Rights Reserved.