@Override public void writeUpdate(OutputStream out, Object value) throws Exception { MarshalOutputStream s = new MarshalOutputStream(out, Collections.EMPTY_LIST); s.writeObject(value); s.flush(); }
/** * Annotates the stream descriptor for the class <code>cl</code>. * * <p><code>MarshalOutputStream</code> implements this method as follows: * * <p>This method invokes {@link RMIClassLoader#getClassAnnotation * RMIClassLoader.getClassAnnotation} with <code>cl</code> to get the appropriate class * annotation string value (possibly <code>null</code>), and then it invokes this stream's * {@link #writeAnnotation writeAnnotation} method with that string to record the annotation. * * @param cl the class to annotate * @throws IOException if <code>writeAnnotation</code> throws an <code>IOException</code> * @throws NullPointerException if <code>cl</code> is <code>null</code> **/ protected void annotateClass(Class cl) throws IOException { writeAnnotation(getAnnotation(cl)); }
@Override protected boolean enableReplaceObject(boolean enable) throws SecurityException { boolean result = super.enableReplaceObject(enable); d.enableReplaceObject = enable; return result; }
new AtomicMarshalOutputStream(child.getOutputStream(), Collections.EMPTY_LIST); out.writeObject(id); ActivationGroupDesc gd = desc; if (gd.getClassName() == null) { gd.getCommandEnvironment()); out.writeObject(gd); out.writeLong(incarnation); out.flush(); out.close();
MarshalOutputStream oos = new MarshalOutputStream(os, Collections.EMPTY_SET); oos.writeObject(proxy); oos.close(); proxyRegistrarBytes = os.toByteArray();
/** * Writes a class annotation string value (possibly <code>null</code>) to be read by a * corresponding <code>MarshalInputStream</code> implementation. * * <p><code>MarshalOutputStream</code> implements this method to just write the annotation value * to this stream using {@link ObjectOutputStream#writeObject writeObject}. * * <p>A subclass can override this method to write the annotation to a different location. * * @param annotation the class annotation string value (possibly <code>null</code>) to write * @throws IOException if I/O exception occurs writing the annotation **/ protected void writeAnnotation(String annotation) throws IOException { writeObject(annotation); }
public void flush() throws IOException { super.flush(); locOut.flush(); } }
@Override protected void writeAnnotation(String annotation) throws IOException { super.writeAnnotation(annotation); }
/** * Writes a class annotation string value (possibly * <code>null</code>) to be read by a corresponding * <code>MarshalInputStream</code> implementation. * * <p><code>MarshalOutputStream</code> implements this method to * just write the annotation value to this stream using {@link * ObjectOutputStream#writeObject writeObject}. * * <p>A subclass can override this method to write the annotation * to a different location. * * @param annotation the class annotation string value (possibly * <code>null</code>) to write * * @throws IOException if I/O exception occurs writing the * annotation **/ protected void writeAnnotation(String annotation) throws IOException { writeObject(annotation); } }
@Override public void flush() throws IOException { super.flush(); locOut.flush(); } }
/** * Annotates the stream descriptor for the proxy class * <code>cl</code>. * * <p><code>MarshalOutputStream</code> implements this method as * follows: * * <p>This method invokes {@link RMIClassLoaderSpi#getClassAnnotation * RMIClassLoaderSpi.getClassAnnotation} with <code>cl</code> to get * the appropriate class annotation string value (possibly * <code>null</code>), and then it invokes this stream's {@link * #writeAnnotation writeAnnotation} method with that string to * record the annotation. * * @param cl the proxy class to annotate * * @throws IOException if <code>writeAnnotation</code> throws an * <code>IOException</code> * * @throws NullPointerException if <code>cl</code> is * <code>null</code> **/ @Override protected void annotateProxyClass(Class cl) throws IOException { writeAnnotation(ClassLoading.getClassAnnotation(cl)); }
@Override public void snapshot(OutputStream out) throws Exception { if (state == null) { state = new Activation(); } MarshalOutputStream s = new MarshalOutputStream(out, Collections.EMPTY_LIST); s.writeObject(state); s.flush(); }
/** * Annotates the stream descriptor for the proxy class <code>cl</code>. * * <p><code>MarshalOutputStream</code> implements this method as follows: * * <p>This method invokes {@link RMIClassLoader#getClassAnnotation * RMIClassLoader.getClassAnnotation} with <code>cl</code> to get the appropriate class * annotation string value (possibly <code>null</code>), and then it invokes this stream's * {@link #writeAnnotation writeAnnotation} method with that string to record the annotation. * * @param cl the proxy class to annotate * @throws IOException if <code>writeAnnotation</code> throws an <code>IOException</code> * @throws NullPointerException if <code>cl</code> is <code>null</code> **/ protected void annotateProxyClass(Class cl) throws IOException { writeAnnotation(getAnnotation(cl)); }
/** * Annotates the stream descriptor for the class <code>cl</code>. * * <p><code>MarshalOutputStream</code> implements this method as * follows: * * <p>This method invokes {@link RMIClassLoaderSpi#getClassAnnotation * RMIClassLoaderSpi.getClassAnnotation} with <code>cl</code> to get * the appropriate class annotation string value (possibly * <code>null</code>), and then it invokes this stream's {@link * #writeAnnotation writeAnnotation} method with that string to * record the annotation. * * @param cl the class to annotate * * @throws IOException if <code>writeAnnotation</code> throws an * <code>IOException</code> * * @throws NullPointerException if <code>cl</code> is * <code>null</code> **/ @Override protected void annotateClass(Class cl) throws IOException { writeAnnotation(ClassLoading.getClassAnnotation(cl)); }