@Override public E read(Excerpt bytes) { E e; try { e = (E) UnsafeExcerpt.UNSAFE.allocateInstance(classMarshaled); e.readExternal(bytes); } catch (Exception e2) { throw new IllegalStateException(e2); } return e; }
@Override public T readObject(ObjectInput input) throws IOException, ClassNotFoundException { PrivilegedExceptionAction<T> action = new PrivilegedExceptionAction<T>() { @Override public T run() throws InstantiationException, IllegalAccessException { return ExternalizableExternalizer.this.getTargetClass().newInstance(); } }; try { T object = WildFlySecurityManager.doChecked(action); object.readExternal(input); return object; } catch (PrivilegedActionException e) { throw new IOException(e.getCause()); } }
extObj.readExternal(this);
InputStream is = dh.getInputStream(); if (is != null) { ((Externalizable)new_bean).readExternal( new ObjectInputStream(is));
protected Object instantiateAndReadNoSer(Class c, FSTClazzInfo clzSerInfo, FSTClazzInfo.FSTFieldInfo referencee, int readPos) throws Exception { Object newObj; newObj = clzSerInfo.newInstance(getCodec().isMapBased()); if (newObj == null) { throw new IOException(referencee.getDesc() + ":Failed to instantiate '" + c.getName() + "'. Register a custom serializer implementing instantiate or define empty constructor.."); } if ( clzSerInfo.isExternalizable() ) { getCodec().ensureReadAhead(readExternalReadAHead); ((Externalizable)newObj).readExternal(this); getCodec().readExternalEnd(); } else { FSTClazzInfo.FSTFieldInfo[] fieldInfo = clzSerInfo.getFieldInfo(); readObjectFields(referencee, clzSerInfo, fieldInfo, newObj,0,0); } return newObj; }
externalizable.writeExternal(soo); soo.doFinish(); ((Externalizable) clone).readExternal(new StepObjectInput(steps)); } else if (serializabilityChecker.isSerializable(clonedClass)) { Class<?> nonSerializable;
externalizable.readExternal(objectInput); objectInput.popCallback(); return serializationMembers.callReadResolve(externalizable);
protected Object instantiateAndReadNoSer(Class c, FSTClazzInfo clzSerInfo, FSTClazzInfo.FSTFieldInfo referencee, int readPos) throws Exception { Object newObj; newObj = clzSerInfo.newInstance(getCodec().isMapBased()); if (newObj == null) { throw new IOException(referencee.getDesc() + ":Failed to instantiate '" + c.getName() + "'. Register a custom serializer implementing instantiate or define empty constructor.."); } if ( clzSerInfo.isExternalizable() ) { getCodec().ensureReadAhead(readExternalReadAHead); ((Externalizable)newObj).readExternal(this); getCodec().readExternalEnd(); } else { FSTClazzInfo.FSTFieldInfo[] fieldInfo = clzSerInfo.getFieldInfo(); readObjectFields(referencee, clzSerInfo, fieldInfo, newObj,0,0); } return newObj; }
((Externalizable)newObj).readExternal(this); getCodec().readExternalEnd(); if ( clzSerInfo.getReadResolveMethod() != null ) {
obj.readExternal(blockUnmarshaller); blockUnmarshaller.readToEndBlockData(); blockUnmarshaller.unblock();
extern.readExternal(this);
((Externalizable)newObj).readExternal(this); getCodec().readExternalEnd(); if ( clzSerInfo.getReadResolveMethod() != null ) {
InputStream is = dh.getInputStream(); if (is != null) { ((Externalizable)new_bean).readExternal( new ObjectInputStream(is));
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { Object opaque = in.readObject(); if (opaque instanceof Integer) { backwardExternalizables[((Integer) opaque)].readExternal(in); } else { gbeanInfo = (GBeanInfo) opaque; backwardExternalizables[0].readExternal(in); } }
public static void readObject(@Nonnull final InputStream is, @Nonnull final Externalizable dst) throws IOException, ClassNotFoundException { ObjectInputStream ois = new ObjectInputStream(is); dst.readExternal(ois); }
@Override public void unpack(ISOComponent m, InputStream in) throws IOException, ISOException { try { if (m instanceof Externalizable) { ObjectInputStream is = new ObjectInputStream(in); ((Externalizable) m).readExternal(is); } } catch (Exception e) { throw new ISOException (e); } }
@Override public E read(Excerpt bytes) { E e; try { e = (E) UnsafeExcerpt.UNSAFE.allocateInstance(classMarshaled); e.readExternal(bytes); } catch (Exception e2) { throw new IllegalStateException(e2); } return e; }
@Override public T getUsing(@Nullable T using) { if (using == null) using = createInstance(); try { using.readExternal(new ObjectInputStream(in)); bytes.readPosition(0); return using; } catch (IOException | ClassNotFoundException e) { throw new RuntimeException(e); } }
@Nullable @Override public E read(Bytes bytes, @Nullable E e) { try { if (e == null) e = getInstance(); e.readExternal(bytes); return e; } catch (Exception e2) { throw new IllegalStateException(e2); } }
@Override public Externalizable read(Class<Externalizable> type, BufferInput buffer, Serializer serializer) { try { Externalizable externalizable = type.newInstance(); externalizable.readExternal(new BufferObjectInput(buffer, serializer)); return externalizable; } catch (InstantiationException | IllegalAccessException e) { throw new SerializationException("failed to instantiate externalizable type: " + type, e); } catch (IOException | ClassNotFoundException e) { throw new SerializationException("failed to deserialize externalizable type: " + type, e); } }