congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MarshalOutputStream
Code IndexAdd Tabnine to your IDE (free)

How to use
MarshalOutputStream
in
net.jini.io

Best Java code snippets using net.jini.io.MarshalOutputStream (Showing top 14 results out of 315)

origin: au.net.zeus.jgdms.phoenix-activation/phoenix

  @Override
public void writeUpdate(OutputStream out, Object value)
  throws Exception
{
  MarshalOutputStream s =
  new MarshalOutputStream(out, Collections.EMPTY_LIST);
  s.writeObject(value);
  s.flush();
}
origin: xap/xap

/**
 * 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));
}
origin: au.net.zeus.jgdms/jgdms-platform

@Override
protected boolean enableReplaceObject(boolean enable)
  throws SecurityException
{
boolean result = super.enableReplaceObject(enable);
  d.enableReplaceObject = enable;
return result;
}
 
origin: au.net.zeus.jgdms.phoenix-activation/phoenix

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();
origin: xap/xap

MarshalOutputStream oos = new MarshalOutputStream(os, Collections.EMPTY_SET);
oos.writeObject(proxy);
oos.close();
proxyRegistrarBytes = os.toByteArray();
origin: xap/xap

/**
 * 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);
}
origin: xap/xap

  public void flush() throws IOException {
    super.flush();
    locOut.flush();
  }
}
origin: au.net.zeus.jgdms/jgdms-platform

@Override
protected void writeAnnotation(String annotation) throws IOException {
super.writeAnnotation(annotation);
}
 
origin: au.net.zeus.jgdms/jgdms-platform

  /**
   * 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);
  }
}
origin: au.net.zeus.jgdms/jgdms-platform

@Override
public void flush() throws IOException {
  super.flush();
  locOut.flush();
}
}
origin: au.net.zeus.jgdms/jgdms-platform

/**
 * 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));
}
origin: au.net.zeus.jgdms.phoenix-activation/phoenix

  @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();
}
 
origin: xap/xap

/**
 * 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));
}
origin: au.net.zeus.jgdms/jgdms-platform

/**
 * 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));
}
net.jini.ioMarshalOutputStream

Javadoc

An extension of ObjectOutputStream that implements the dynamic class loading semantics of Java(TM) Remote Method Invocation (Java RMI) argument and result marshalling (using RMIClassLoader). A MarshalOutputStream writes data that is intended to be written by a corresponding MarshalInputStream.

MarshalOutputStream implements the output side of the dynamic class loading semantics by overriding ObjectOutputStream#annotateClass and ObjectOutputStream#annotateProxyClass to annotate class descriptors in the stream with codebase strings obtained using RMIClassLoader#getClassAnnotation.

MarshalOutputStream writes class annotations to its own stream; a subclass may override the #writeAnnotation method to write the class annotations to a different location.

MarshalOutputStream does not modify the stream protocol version of its instances' superclass state (see ObjectOutputStream#useProtocolVersion).

Most used methods

  • writeObject
  • flush
  • <init>
  • close
  • writeAnnotation
    Writes a class annotation string value (possiblynull) to be read by a correspondingMarshalInputStrea
  • enableReplaceObject
  • getAnnotation
    Returns the class CodeBase if needed or null.
  • writeLong

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JFrame (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now