Package com.sun.enterprise.naming.util

Examples of com.sun.enterprise.naming.util.ObjectInputStreamWithLoader


        }
    }

    @Override
    public void _storeable_readState(InputStream is) throws IOException {
        ObjectInputStream ois = new ObjectInputStreamWithLoader(is, SFSBBeanState.class.getClassLoader());

        try {
            sessionId = (Serializable) ois.readObject();
            version = ois.readLong();
            lastAccess = ois.readLong();
            maxIdleTime = ois.readLong();
            isNew = ois.readBoolean();
           
            int len = ois.readInt();
            state = new byte[len];
            int index = 0;

            for (int remaining = len; remaining > 0;) {
                int count = ois.read(state, index, remaining);
                if (count < 0) {
                    throw new IOException("EOF while still (" + remaining + "/" + len + ") more bytes to read");
                }
               
                remaining -= count;
                index += count;
            }
        } catch (ClassNotFoundException cnfEx) {
            throw new IOException(cnfEx);
        } finally {
            try { ois.close(); } catch (Exception ex) {}
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.naming.util.ObjectInputStreamWithLoader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.