/** * Reads in and returns IOException that caused serialization to abort. * All stream state is discarded prior to reading in fatal exception. Sets * passHandle to fatal exception's handle. */ private IOException readFatalException() throws IOException { if (bin.readByte() != TC_EXCEPTION) { throw new InternalError(); } clear(); return (IOException) readObject0(false); }
/** * Reads in and returns IOException that caused serialization to abort. * All stream state is discarded prior to reading in fatal exception. Sets * passHandle to fatal exception's handle. */ private IOException readFatalException() throws IOException { if (bin.readByte() != TC_EXCEPTION) { throw new InternalError(); } clear(); return (IOException) readObject0(false); }
Exception in thread "main" java.io.InvalidClassException: TestData; Serializable incompatible with Externalizable at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:634) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371) at ReadIt.main(ReadIt.java:10)
Object obj = readObject0(true); handles.markDependency(outerHandle, passHandle); ClassNotFoundException ex = handles.lookupException(passHandle);
readObject0(false); Object[] oa = (Object[]) array; for (int i = 0; i < len; i++) { oa[i] = readObject0(false); handles.markDependency(arrayHandle, passHandle);
Object obj = readObject0(true); handles.markDependency(outerHandle, passHandle); ClassNotFoundException ex = handles.lookupException(passHandle);
readObject0(false); Object[] oa = (Object[]) array; for (int i = 0; i < len; i++) { oa[i] = readObject0(false); handles.markDependency(arrayHandle, passHandle);
for (int i = 0; i < objVals.length; i++) { ObjectStreamField f = fields[numPrimFields + i]; objVals[i] = readObject0(f.isUnshared()); if (f.getField() != null) { handles.markDependency(objHandle, passHandle);
/** * Skips over all block data and objects until TC_ENDBLOCKDATA is * encountered. */ private void skipCustomData() throws IOException { int oldHandle = passHandle; for (;;) { if (bin.getBlockDataMode()) { bin.skipBlockData(); bin.setBlockDataMode(false); } switch (bin.peekByte()) { case TC_BLOCKDATA: case TC_BLOCKDATALONG: bin.setBlockDataMode(true); break; case TC_ENDBLOCKDATA: bin.readByte(); passHandle = oldHandle; return; default: readObject0(false); break; } } }
/** * Skips over all block data and objects until TC_ENDBLOCKDATA is * encountered. */ private void skipCustomData() throws IOException { int oldHandle = passHandle; for (;;) { if (bin.getBlockDataMode()) { bin.skipBlockData(); bin.setBlockDataMode(false); } switch (bin.peekByte()) { case TC_BLOCKDATA: case TC_BLOCKDATALONG: bin.setBlockDataMode(true); break; case TC_ENDBLOCKDATA: bin.readByte(); passHandle = oldHandle; return; default: readObject0(false); break; } } }
for (int i = 0; i < objVals.length; i++) { ObjectStreamField f = fields[numPrimFields + i]; objVals[i] = readObject0(f.isUnshared()); if (f.getField() != null) { handles.markDependency(objHandle, passHandle);