| java.lang.Object java.io.InputStream java.io.ObjectInputStream org.jboss.util.stream.CustomObjectInputStreamWithClassloader
CustomObjectInputStreamWithClassloader | public class CustomObjectInputStreamWithClassloader extends ObjectInputStream (Code) | | Customized object input stream that
- redefines
readClassDescriptor() in order to read a short
class descriptor (just the class name) when deserializing an
object
- takes a class loader in its constructor and uses it to retrieve
the class definitions.
author: Rickard Oberg author: Francisco Reverbel version: $Revision: 57194 $ |
Field Summary | |
ClassLoader | cl The classloader to use when the default classloader cannot find
the classes in the stream. |
cl | ClassLoader cl(Code) | | The classloader to use when the default classloader cannot find
the classes in the stream.
|
CustomObjectInputStreamWithClassloader | public CustomObjectInputStreamWithClassloader(InputStream in, ClassLoader cl) throws IOException(Code) | | Constructs a new instance with the given classloader and input stream.
Parameters: in - stream to read objects from Parameters: cl - classloader to use |
resolveClass | protected Class resolveClass(ObjectStreamClass classdesc) throws IOException, ClassNotFoundException(Code) | | Resolves the class described in the classdesc parameter. First, try the
default classloader (implemented by the super class). If it cannot
load the class, try the classloader given to this instance.
Parameters: classdesc - class description object the Class corresponding to class description exception: IOException - if an I/O error occurs exception: ClassNotFoundException - if the class cannot be found by the classloader |
Methods inherited from java.io.ObjectInputStream | public int available() throws IOException(Code)(Java Doc) public void close() throws IOException(Code)(Java Doc) public void defaultReadObject() throws IOException, ClassNotFoundException(Code)(Java Doc) protected boolean enableResolveObject(boolean enable) throws SecurityException(Code)(Java Doc) public int read() throws IOException(Code)(Java Doc) public int read(byte[] buf, int off, int len) throws IOException(Code)(Java Doc) public boolean readBoolean() throws IOException(Code)(Java Doc) public byte readByte() throws IOException(Code)(Java Doc) public char readChar() throws IOException(Code)(Java Doc) protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException(Code)(Java Doc) public double readDouble() throws IOException(Code)(Java Doc) public ObjectInputStream.GetField readFields() throws IOException, ClassNotFoundException(Code)(Java Doc) public float readFloat() throws IOException(Code)(Java Doc) public void readFully(byte[] buf) throws IOException(Code)(Java Doc) public void readFully(byte[] buf, int off, int len) throws IOException(Code)(Java Doc) public int readInt() throws IOException(Code)(Java Doc) public String readLine() throws IOException(Code)(Java Doc) public long readLong() throws IOException(Code)(Java Doc) final public Object readObject() throws IOException, ClassNotFoundException(Code)(Java Doc) protected Object readObjectOverride() throws IOException, ClassNotFoundException(Code)(Java Doc) public short readShort() throws IOException(Code)(Java Doc) protected void readStreamHeader() throws IOException, StreamCorruptedException(Code)(Java Doc) public String readUTF() throws IOException(Code)(Java Doc) public Object readUnshared() throws IOException, ClassNotFoundException(Code)(Java Doc) public int readUnsignedByte() throws IOException(Code)(Java Doc) public int readUnsignedShort() throws IOException(Code)(Java Doc) public void registerValidation(ObjectInputValidation obj, int prio) throws NotActiveException, InvalidObjectException(Code)(Java Doc) protected Class> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException(Code)(Java Doc) protected Object resolveObject(Object obj) throws IOException(Code)(Java Doc) protected Class> resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException(Code)(Java Doc) public int skipBytes(int len) throws IOException(Code)(Java Doc)
|
|
|