org.apache.derby.iapi.services.io
Class FormatIdInputStream

java.lang.Object
  extended byjava.io.InputStream
      extended byjava.io.FilterInputStream
          extended byjava.io.DataInputStream
              extended byorg.apache.derby.iapi.services.io.FormatIdInputStream
All Implemented Interfaces:
java.io.DataInput, ErrorInfo, ErrorObjectInput, java.io.ObjectInput, Resetable

public final class FormatIdInputStream
extends java.io.DataInputStream
implements ErrorObjectInput, Resetable

A stream for reading objects with format id tags which was produced by a FormatIdOutputStream.

Please see the documentation for FormatIdOutputStream for information about the streams format and capabilites.


Field Summary
protected  ClassFactory cf
           
private  ErrorInfo errorInfo
           
private  java.lang.Exception myNestedException
           
 
Fields inherited from class java.io.DataInputStream
 
Fields inherited from class java.io.FilterInputStream
in
 
Fields inherited from class java.io.InputStream
 
Constructor Summary
FormatIdInputStream(java.io.InputStream in)
          Constructor for a FormatIdInputStream
 
Method Summary
 void closeStream()
          Close.
(package private)  ClassFactory getClassFactory()
           
 java.lang.String getErrorInfo()
           
 java.io.InputStream getInputStream()
           
 java.lang.Exception getNestedException()
           
private  java.io.ObjectInputStream getObjectStream()
           
 void initStream()
          Initialize.
 java.lang.Object readObject()
          Read an object from this stream.
 void resetStream()
          Resetable interface
private  void setErrorInfo(ErrorInfo ei)
           
 void setInput(java.io.InputStream in)
          Set the InputStream for this FormatIdInputStream to the stream provided.
 
Methods inherited from class java.io.DataInputStream
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
 
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, 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
available, close, read, read, read, skip
 
Methods inherited from interface java.io.DataInput
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
 

Field Detail

cf

protected ClassFactory cf

errorInfo

private ErrorInfo errorInfo

myNestedException

private java.lang.Exception myNestedException
Constructor Detail

FormatIdInputStream

public FormatIdInputStream(java.io.InputStream in)
Constructor for a FormatIdInputStream

Parameters:
in - bytes come from here.
Method Detail

readObject

public java.lang.Object readObject()
                            throws java.io.IOException,
                                   java.lang.ClassNotFoundException
Read an object from this stream.

Specified by:
readObject in interface java.io.ObjectInput
Returns:
The read object.
Throws:
java.io.IOException - An IO or serialization error occured.
java.lang.ClassNotFoundException - A class for an object in the stream could not be found.

setInput

public void setInput(java.io.InputStream in)
Set the InputStream for this FormatIdInputStream to the stream provided.

Parameters:
in - The new input stream.

getInputStream

public java.io.InputStream getInputStream()

getErrorInfo

public java.lang.String getErrorInfo()
Specified by:
getErrorInfo in interface ErrorObjectInput

getNestedException

public java.lang.Exception getNestedException()
Specified by:
getNestedException in interface ErrorObjectInput

setErrorInfo

private void setErrorInfo(ErrorInfo ei)

getClassFactory

ClassFactory getClassFactory()

getObjectStream

private java.io.ObjectInputStream getObjectStream()
                                           throws java.io.IOException
Throws:
java.io.IOException

resetStream

public void resetStream()
                 throws java.io.IOException,
                        StandardException
Resetable interface

Specified by:
resetStream in interface Resetable
Throws:
java.io.IOException
StandardException

initStream

public void initStream()
                throws StandardException
Description copied from interface: Resetable
Initialize. Needs to be called first, before a resetable stream can be used.

Specified by:
initStream in interface Resetable
Throws:
StandardException

closeStream

public void closeStream()
Description copied from interface: Resetable
Close. Free resources (such as open containers and locks) associated with the stream.

Specified by:
closeStream in interface Resetable

Built on Mon 2007-06-04 09:58:47+0400, from revision ???

Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.