java.io.Closeable, java.io.DataInput, java.io.ObjectInput, java.lang.AutoCloseable, CloneableStream, ErrorInfo, ErrorObjectInput, Resetablepublic final class FormatIdInputStream extends java.io.DataInputStream implements ErrorObjectInput, Resetable, CloneableStream
Please see the documentation for FormatIdOutputStream for information about the streams format and capabilites.
| Modifier and Type | Field | Description |
|---|---|---|
protected ClassFactory |
cf |
|
private ErrorInfo |
errorInfo |
|
private java.lang.Exception |
myNestedException |
| Constructor | Description |
|---|---|
FormatIdInputStream(java.io.InputStream in) |
Constructor for a FormatIdInputStream
|
| Modifier and Type | Method | Description |
|---|---|---|
java.io.InputStream |
cloneStream() |
Clone the stream.
|
void |
closeStream() |
Close.
|
(package private) ClassFactory |
getClassFactory() |
|
private static Context |
getContextOrNull(java.lang.String contextID) |
Privileged lookup of a Context.
|
java.lang.String |
getErrorInfo() |
|
java.io.InputStream |
getInputStream() |
|
java.lang.Exception |
getNestedException() |
|
private java.io.ObjectInputStream |
getObjectStream() |
|
private <T extends java.lang.Throwable> |
handleReadError(T cause,
java.io.ObjectInputStream stream) |
Handle an error that happened within
readObject() when reading
a Serializable object. |
void |
initStream() |
Initialize.
|
java.lang.Object |
readObject() |
Read an object from this stream.
|
void |
resetStream() |
Reset the stream to the beginning.
|
private void |
setErrorInfo(ErrorInfo ei) |
|
void |
setInput(java.io.InputStream in) |
Set the InputStream for this FormatIdInputStream to the stream
provided.
|
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytesread, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytesavailable, close, mark, markSupported, read, reset, skipprotected ClassFactory cf
private ErrorInfo errorInfo
private java.lang.Exception myNestedException
public FormatIdInputStream(java.io.InputStream in)
in - bytes come from here.public java.lang.Object readObject()
throws java.io.IOException,
java.lang.ClassNotFoundException
readObject in interface java.io.ObjectInputjava.io.IOException - An IO or serialization error occurred.java.lang.ClassNotFoundException - A class for an object in
the stream could not be found.public void setInput(java.io.InputStream in)
in - The new input stream.public java.io.InputStream getInputStream()
public java.lang.String getErrorInfo()
getErrorInfo in interface ErrorInfogetErrorInfo in interface ErrorObjectInputpublic java.lang.Exception getNestedException()
getNestedException in interface ErrorInfogetNestedException in interface ErrorObjectInputprivate void setErrorInfo(ErrorInfo ei)
private <T extends java.lang.Throwable> T handleReadError(T cause,
java.io.ObjectInputStream stream)
readObject() when reading
a Serializable object.T - the type of exception that was throwncause - the thrown exceptionstream - the stream from which the exception was thrownClassFactory getClassFactory()
private java.io.ObjectInputStream getObjectStream()
throws java.io.IOException
java.io.IOExceptionpublic void resetStream()
throws java.io.IOException,
StandardException
ResetableresetStream in interface Resetablejava.io.IOExceptionStandardExceptionResetable.resetStream()public void initStream()
throws StandardException
ResetableinitStream in interface ResetableStandardExceptionResetable.initStream()public void closeStream()
ResetablecloseStream in interface ResetableResetable.closeStream()public java.io.InputStream cloneStream()
CloneableStreamTo be used when a "deep" clone of a stream is required rather than multiple references to the same stream.
The resulting clone should support reads, resets, closes which do not affect the original stream source of the clone.
cloneStream in interface CloneableStreamCloneableStream.cloneStream()private static Context getContextOrNull(java.lang.String contextID)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.