/* * Copyright (c) 1999,2009 Declarative Engineering LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Declarative Engineering LLC * verson 1 which accompanies this distribution, and is available at * http://declarativeengineering.com/legal/DE_Developer_License_v1.txt */ package com.de22.orb.io; import java.io.InputStream; import java.io.IOException; import com.common.io.*; import com.de22.orb.*; public class OrbObjectInputStream extends ObjectInputStream implements IOrbInputStream { private AbstractConnection socket = null; private IOrbInputStream inputStream = null; private OrbByteArrayInputStream byteInputStream = null; /** * OrbObjectInputStream constructor. * @param inputStream * @param byteInputStream * @param loader * @param classReplacementHandler The optional handler called when the stream loads a class. Allows the stream to replace one class name with another. * @param classList * @param classTracker * @param socket The socket associated with the stream. * @exception java.io.IOException */ public OrbObjectInputStream(IOrbInputStream inputStream, OrbByteArrayInputStream byteInputStream, ClassLoader loader, IClassReplacementHandler classReplacementHandler, com.common.util.IList classList, com.common.io.IInstanceFactory instancefactory, com.common.io.IClassTracker classTracker, AbstractConnection socket) throws java.io.IOException { super((InputStream) inputStream, loader, classReplacementHandler, classList, instancefactory, classTracker, STYLE_MSF); this.inputStream = inputStream; this.socket = socket; this.byteInputStream = byteInputStream; }//OrbObjectInputStream()// /** * OrbObjectInputStream constructor. * @param inputStream * @param byteInputStream * @param loader * @param classReplacementHandler The optional handler called when the stream loads a class. Allows the stream to replace one class name with another. * @param classList * @param socket The socket associated with the stream. * @exception java.io.IOException */ public OrbObjectInputStream(IOrbInputStream inputStream, OrbByteArrayInputStream byteInputStream, ClassLoader loader, IClassReplacementHandler classReplacementHandler, com.common.util.IList classList, AbstractConnection socket) throws java.io.IOException { super((InputStream) inputStream, loader, classReplacementHandler, classList, null, null); this.inputStream = inputStream; this.socket = socket; this.byteInputStream = byteInputStream; }//OrbObjectInputStream()// /** * Gets the byte array input stream. * @return The underlying byte array input stream. */ public OrbByteArrayInputStream getByteInputStream() { return byteInputStream; }//getByteInputStream()// /** * @see IInputStream.canReadFrom() */ public boolean canReadFrom() { return inputStream.canReadFrom(); }//canReadFrom()// /** * Gets the socket associated with this stream. * @return The socket associated with the stream. */ public AbstractConnection getSocket() { return socket; }//getSocket()// /** * @see IInputStream.readFrom(java.io.InputStream, int) */ public void readFrom(InputStream in, int numberOfBytes) throws IOException { inputStream.readFrom(in, numberOfBytes); }//readFrom()// }//OrbObjectInputStream//