@Override public MarshalInstanceOutput createMarshalOutput(OutputStream objOut, OutputStream locOut, Collection context) throws IOException { return new MarshalledInstanceOutputStream(objOut, locOut, context); } }
public Object resolve( CodebaseAccessor bootstrapProxy, MarshalledInstance smartProxy, ClassLoader parentLoader, ClassLoader verifierLoader, Collection context) throws IOException, ClassNotFoundException { return smartProxy.get(parentLoader, true, verifierLoader, context); }
/** * Activation constructor * * @param activationID activation ID passed in by the activation daemon. * @param data state data needed to re-activate a Mercury server */ MailboxImpl(ActivationID activationID, MarshalledObject data) throws Exception { this((String[]) new MarshalledInstance(data).get(false), activationID, true, new Object[] {activationID, data} ); }
/** Set the reference to the client-supplied notification target */ public synchronized void setEventTarget(RemoteEventListener preparedTarget) throws IOException { if (preparedTarget == null) { preparedEventTarget = null; marshalledEventTarget = null; } else { preparedEventTarget = preparedTarget; marshalledEventTarget = new MarshalledInstance(preparedTarget).convertToMarshalledObject(); } }
/** * Creates a new <code>MarshalledWrapper</code> wrapping a * <code>MarshalledInstance</code> containing the given object. * * @param obj object to create <code>MarshalledInstance</code> with * @throws IOException if <code>MarshalledInstance</code> creation fails */ public MarshalledWrapper(Object obj) throws IOException { instance = new MarshalledInstance(obj); }
@Override public void writeUpdate(OutputStream out, Object value) throws Exception { MarshalOutputStream s = new MarshalOutputStream(out, Collections.EMPTY_LIST); s.writeObject(value); s.flush(); }
Object readResolve() throws ObjectStreamException { return instance.convertToMarshalledObject(); } }
@Override protected void writeAnnotation(String annotation) throws IOException { super.writeAnnotation(annotation); }
/** * Writes the specified byte to this byte array output stream. * * @param b the byte to be written. */ public void write(int b) { ensureCapacity(1); _buffer[_count++] = (byte) b; }
private MarshalledInstance(Object obj, Collection context, MarshalFactory factory, ByteArrayOutputStream bout, ByteArrayOutputStream lout) throws IOException { this(bout, obj != null ? writeOutRetLocAnnotation(obj, context, factory, bout, lout) : null ); }
@Override protected boolean enableReplaceObject(boolean enable) throws SecurityException { boolean result = super.enableReplaceObject(enable); d.enableReplaceObject = enable; return result; }
/** * Reads the next byte of data from this input stream. The value byte is returned as an * <code>int</code> in the range <code>0</code> to <code>255</code>. If no byte is available * because the end of the stream has been reached, the value <code>-1</code> is returned. <p> * This <code>read</code> method cannot block. * * @return the next byte of data, or <code>-1</code> if the end of the stream has been reached. */ public int read() { return (_position < _count) ? readUnsignedByte() : -1; }
/** * Sub classes implement this method to use alternative Serialization * frameworks to unmarshall data. * @return a new MarshalFactory instance. */ protected MarshalFactory getMarshalFactory(){ return new MarshalFactoryInstance(); }
/** * Set stream buffer, and reset the counter. * * @param buf new buffer */ public void setBuffer(byte[] buf) { setBuffer(buf, 0); }
/** * Creates an instance with the specified detail message and cause. * * @param s the detail message * @param cause the cause */ public UnsupportedConstraintException(String s, Throwable cause) { super(s); initCause(cause); } }
/** * Creates a <code>ByteArrayInputStream</code> so that it uses <code>buffer</code> as its * buffer array. The buffer array is not copied. The initial value of <code>pos</code> is * <code>0</code> and the initial value of <code>count</code> is the length of * <code>buffer</code>. * * @param buffer the input buffer. */ public OptimizedByteArrayInputStream(byte buffer[]) { setBuffer(buffer); }
public ClassLoader run() { return ((MarshalInputStream) input).getVerifierClassLoader(); } });
public ClassLoader run() { return ((MarshalInputStream) input).getDefaultClassLoader(); } });
MarshalledObjectSerializer(MarshalledObject obj){ this(new MarshalledInstance(obj)); }
public void writeByte(byte b) { ensureCapacity(1); _buffer[_count++] = b; }