Package org.jboss.marshalling
Class MarshallerObjectInput
- java.lang.Object
-
- org.jboss.marshalling.MarshallerObjectInput
-
- All Implemented Interfaces:
DataInput
,ObjectInput
,AutoCloseable
public class MarshallerObjectInput extends Object implements ObjectInput
A marshaller's object input. This implementation delegates to anUnmarshaller
implementation while throwing an exception ifclose()
is called.This class is not part of the marshalling API; rather it is intended for marshaller implementors to make it easier to develop Java serialization-compatible marshallers.
-
-
Constructor Summary
Constructors Constructor Description MarshallerObjectInput(Unmarshaller unmarshaller)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
This implementation always throws anIllegalStateException
.int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
boolean
readBoolean()
byte
readByte()
char
readChar()
double
readDouble()
float
readFloat()
void
readFully(byte[] b)
void
readFully(byte[] b, int off, int len)
int
readInt()
String
readLine()
long
readLong()
Object
readObject()
short
readShort()
int
readUnsignedByte()
int
readUnsignedShort()
String
readUTF()
long
skip(long n)
int
skipBytes(int n)
-
-
-
Constructor Detail
-
MarshallerObjectInput
public MarshallerObjectInput(Unmarshaller unmarshaller)
Construct a new instance.- Parameters:
unmarshaller
- the unmarshaller to delegate to
-
-
Method Detail
-
readObject
public Object readObject() throws ClassNotFoundException, IOException
- Specified by:
readObject
in interfaceObjectInput
- Throws:
ClassNotFoundException
IOException
-
read
public int read() throws IOException
- Specified by:
read
in interfaceObjectInput
- Throws:
IOException
-
read
public int read(byte[] b) throws IOException
- Specified by:
read
in interfaceObjectInput
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- Specified by:
read
in interfaceObjectInput
- Throws:
IOException
-
skip
public long skip(long n) throws IOException
- Specified by:
skip
in interfaceObjectInput
- Throws:
IOException
-
available
public int available() throws IOException
- Specified by:
available
in interfaceObjectInput
- Throws:
IOException
-
close
public void close() throws IOException
This implementation always throws anIllegalStateException
.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceObjectInput
- Throws:
IOException
-
readFully
public void readFully(byte[] b) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
readFully
public void readFully(byte[] b, int off, int len) throws IOException
- Specified by:
readFully
in interfaceDataInput
- Throws:
IOException
-
skipBytes
public int skipBytes(int n) throws IOException
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
IOException
-
readBoolean
public boolean readBoolean() throws IOException
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
IOException
-
readByte
public byte readByte() throws IOException
- Specified by:
readByte
in interfaceDataInput
- Throws:
IOException
-
readUnsignedByte
public int readUnsignedByte() throws IOException
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
IOException
-
readShort
public short readShort() throws IOException
- Specified by:
readShort
in interfaceDataInput
- Throws:
IOException
-
readUnsignedShort
public int readUnsignedShort() throws IOException
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
IOException
-
readChar
public char readChar() throws IOException
- Specified by:
readChar
in interfaceDataInput
- Throws:
IOException
-
readInt
public int readInt() throws IOException
- Specified by:
readInt
in interfaceDataInput
- Throws:
IOException
-
readLong
public long readLong() throws IOException
- Specified by:
readLong
in interfaceDataInput
- Throws:
IOException
-
readFloat
public float readFloat() throws IOException
- Specified by:
readFloat
in interfaceDataInput
- Throws:
IOException
-
readDouble
public double readDouble() throws IOException
- Specified by:
readDouble
in interfaceDataInput
- Throws:
IOException
-
readLine
public String readLine() throws IOException
- Specified by:
readLine
in interfaceDataInput
- Throws:
IOException
-
readUTF
public String readUTF() throws IOException
- Specified by:
readUTF
in interfaceDataInput
- Throws:
IOException
-
-