public void writeObject(final Marshaller marshaller, final Object obj) throws IOException { marshaller.writeByte(idx); objectTable.getObjectWriter(obj).writeObject(marshaller, obj); } }));
/** {@inheritDoc} */ public Object readObject(final Unmarshaller unmarshaller) throws IOException, ClassNotFoundException { final int v = unmarshaller.readByte() & 0xff; final ObjectTable table = readers[v]; if (table == null) { throw new StreamCorruptedException(String.format("Unknown object table ID %02x encountered", Integer.valueOf(v))); } return table.readObject(unmarshaller); } }
/** {@inheritDoc} */ public Writer getObjectWriter(final Object obj) throws IOException { for (Pair<ObjectTable, Writer> entry : writers) { final ObjectTable table = entry.getA(); final Writer writer = entry.getB(); if (table.getObjectWriter(obj) != null) { return writer; } } return null; }
throw new InvalidObjectException("Attempt to read a predefined object as unshared"); return objectTable.readObject(this);
@Override public boolean isMarshallable(Object object) { if (object == null) return true; MarshallingConfiguration configuration = this.repository.getMarshallingConfiguration(this.repository.getCurrentMarshallingVersion()); try { ObjectTable table = configuration.getObjectTable(); if ((table != null) && table.getObjectWriter(object) != null) return true; ClassExternalizerFactory factory = configuration.getClassExternalizerFactory(); if ((factory != null) && (factory.getExternalizer(object.getClass()) != null)) return true; SerializabilityChecker checker = configuration.getSerializabilityChecker(); return ((checker == null) ? SerializabilityChecker.DEFAULT : checker).isSerializable(object.getClass()); } catch (IOException e) { return false; } } }
/** {@inheritDoc} */ public Object readObject(final Unmarshaller unmarshaller) throws IOException, ClassNotFoundException { final int v = unmarshaller.readByte() & 0xff; final ObjectTable table = readers[v]; if (table == null) { throw new StreamCorruptedException(String.format("Unknown object table ID %02x encountered", Integer.valueOf(v))); } return table.readObject(unmarshaller); } }
if (! unshared && (objectTableWriter = objectTable.getObjectWriter(obj)) != null) { write(ID_PREDEFINED_OBJECT); if (configuredVersion == 1) {
/** {@inheritDoc} */ public Object readObject(final Unmarshaller unmarshaller) throws IOException, ClassNotFoundException { final int v = unmarshaller.readByte() & 0xff; final ObjectTable table = readers[v]; if (table == null) { throw new StreamCorruptedException(String.format("Unknown object table ID %02x encountered", Integer.valueOf(v))); } return table.readObject(unmarshaller); } }
public void writeObject(final Marshaller marshaller, final Object obj) throws IOException { marshaller.writeByte(idx); objectTable.getObjectWriter(obj).writeObject(marshaller, obj); } }));
/** {@inheritDoc} */ public Object readObject(final Unmarshaller unmarshaller) throws IOException, ClassNotFoundException { final int v = unmarshaller.readByte() & 0xff; final ObjectTable table = readers[v]; if (table == null) { throw new StreamCorruptedException(String.format("Unknown object table ID %02x encountered", Integer.valueOf(v))); } return table.readObject(unmarshaller); } }
/** {@inheritDoc} */ public Writer getObjectWriter(final Object obj) throws IOException { for (Pair<ObjectTable, Writer> entry : writers) { final ObjectTable table = entry.getA(); final Writer writer = entry.getB(); if (table.getObjectWriter(obj) != null) { return writer; } } return null; }
/** {@inheritDoc} */ public Object readObject(final Unmarshaller unmarshaller) throws IOException, ClassNotFoundException { final int v = unmarshaller.readByte() & 0xff; final ObjectTable table = readers[v]; if (table == null) { throw new StreamCorruptedException(String.format("Unknown object table ID %02x encountered", Integer.valueOf(v))); } return table.readObject(unmarshaller); } }
/** {@inheritDoc} */ public Writer getObjectWriter(final Object obj) throws IOException { for (Pair<ObjectTable, Writer> entry : writers) { final ObjectTable table = entry.getA(); final Writer writer = entry.getB(); if (table.getObjectWriter(obj) != null) { return writer; } } return null; }
/** {@inheritDoc} */ public Object readObject(final Unmarshaller unmarshaller) throws IOException, ClassNotFoundException { final int v = unmarshaller.readByte() & 0xff; final ObjectTable table = readers[v]; if (table == null) { throw new StreamCorruptedException(String.format("Unknown object table ID %02x encountered", Integer.valueOf(v))); } return table.readObject(unmarshaller); } }
public void writeObject(final Marshaller marshaller, final Object obj) throws IOException { marshaller.writeByte(idx); objectTable.getObjectWriter(obj).writeObject(marshaller, obj); } }));
final Object obj = objectTable.readObject(blockUnmarshaller); blockUnmarshaller.readToEndBlockData(); blockUnmarshaller.unblock(); } else { return objectTable.readObject(this);
/** {@inheritDoc} */ public Writer getObjectWriter(final Object obj) throws IOException { for (Pair<ObjectTable, Writer> entry : writers) { final ObjectTable table = entry.getA(); final Writer writer = entry.getB(); if (table.getObjectWriter(obj) != null) { return writer; } } return null; }
throw new InvalidObjectException("Attempt to read a predefined object as unshared"); return objectTable.readObject(this);
public void writeObject(final Marshaller marshaller, final Object obj) throws IOException { marshaller.writeByte(idx); objectTable.getObjectWriter(obj).writeObject(marshaller, obj); } }));
throw new InvalidObjectException("Attempt to read a predefined object as unshared"); return objectTable.readObject(this);