CustomObjectInputStream objectInput = CustomObjectInputStream.getInstance(context, callback, classLoaderReference); externalizable.readExternal(objectInput); objectInput.popCallback(); return serializationMembers.callReadResolve(externalizable); } catch (NoSuchMethodException e) {
public static synchronized CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoaderReference classLoaderReference) { try { CustomObjectInputStream result = (CustomObjectInputStream) whereFrom.get(DATA_HOLDER_KEY); if (result == null) { result = new CustomObjectInputStream(callback, classLoaderReference); whereFrom.put(DATA_HOLDER_KEY, result); } else { result.pushCallback(callback); } return result; } catch (SecurityException e) { throw new ObjectAccessException("Cannot create CustomObjectStream", e); } catch (IOException e) { throw new StreamException("Cannot create CustomObjectStream", e); } }
public int read(byte[] buf, int off, int len) throws IOException { byte[] b = (byte[])peekCallback().readFromStream(); if (b.length != len) { throw new StreamCorruptedException("Expected " + len + " bytes from stream, got " + b.length); } System.arraycopy(b, 0, buf, off, len); return len; }
/** * @deprecated As of 1.4 use {@link #getInstance(DataHolder, StreamCallback, ClassLoader)} */ public static CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback) { return getInstance(whereFrom, callback, (ClassLoader)null); }
public int read() throws IOException { return readUnsignedByte(); }
public void readFully(byte[] buf) throws IOException { readFully(buf, 0, buf.length); }
public Object readUnshared() throws IOException, ClassNotFoundException { return readObject(); }
public int read(byte b[]) throws IOException { return read(b, 0, b.length); }
return new CustomObjectInputStream(new CustomObjectInputStream.StreamCallback() { public Object readFromStream() throws EOFException { if (!reader.hasMoreChildren()) {
/** * @deprecated As of 1.4.5 use {@link #getInstance(DataHolder, StreamCallback, ClassLoaderReference)} */ public static synchronized CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoader classLoader) { return getInstance(whereFrom, callback, new ClassLoaderReference(classLoader)); }
@Override public int read() throws IOException { return readUnsignedByte(); }
@Override public void readFully(final byte[] buf) throws IOException { readFully(buf, 0, buf.length); }
@Override public Object readUnshared() throws IOException, ClassNotFoundException { return readObject(); }
@Override public int read(final byte b[]) throws IOException { return read(b, 0, b.length); }
return new CustomObjectInputStream(new CustomObjectInputStream.StreamCallback() { public Object readFromStream() throws EOFException { if (!reader.hasMoreChildren()) {
CustomObjectInputStream.getInstance(context, callback, classLoaderReference); serializationMembers.callReadObject(currentType[0], result, objectInputStream); objectInputStream.popCallback(); } else { try {
public static synchronized CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback, ClassLoader classLoaderReference) { try { CustomObjectInputStream result = (CustomObjectInputStream) whereFrom.get(DATA_HOLDER_KEY); if (result == null) { result = new CustomObjectInputStream(callback, classLoaderReference); whereFrom.put(DATA_HOLDER_KEY, result); } else { result.pushCallback(callback); } return result; } catch (IOException e) { throw new ConversionException("Cannot create CustomObjectStream", e); } }
/** * @deprecated As of 1.4 use {@link #getInstance(DataHolder, StreamCallback, ClassLoader)} */ public static CustomObjectInputStream getInstance(DataHolder whereFrom, CustomObjectInputStream.StreamCallback callback) { return getInstance(whereFrom, callback, (ClassLoader)null); }
public void readFully(byte[] buf, int off, int len) throws IOException { byte[] b = (byte[])peekCallback().readFromStream(); System.arraycopy(b, 0, buf, off, len); }
public int read() throws IOException { return readUnsignedByte(); }