java.io.Closeable
, java.io.DataInput
, java.io.ObjectInput
, java.lang.AutoCloseable
, CloneableStream
, ErrorInfo
, ErrorObjectInput
, Resetable
public 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, skipBytes
read, read, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, readUTF, skipBytes
available, close, mark, markSupported, read, reset, skip
protected 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.ObjectInput
java.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 ErrorInfo
getErrorInfo
in interface ErrorObjectInput
public java.lang.Exception getNestedException()
getNestedException
in interface ErrorInfo
getNestedException
in interface ErrorObjectInput
private 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.IOException
public void resetStream() throws java.io.IOException, StandardException
Resetable
resetStream
in interface Resetable
java.io.IOException
StandardException
Resetable.resetStream()
public void initStream() throws StandardException
Resetable
initStream
in interface Resetable
StandardException
Resetable.initStream()
public void closeStream()
Resetable
closeStream
in interface Resetable
Resetable.closeStream()
public java.io.InputStream cloneStream()
CloneableStream
To 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 CloneableStream
CloneableStream.cloneStream()
private static Context getContextOrNull(java.lang.String contextID)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.