Tabnine Logo
MarshalInputStream
Code IndexAdd Tabnine to your IDE (free)

How to use
MarshalInputStream
in
net.jini.io

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

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

  @Override
public void recover(InputStream in) throws Exception {
  MarshalInputStream s =
  new MarshalInputStream(in,
          ActLogHandler.class.getClassLoader(),
          false, null, Collections.EMPTY_LIST);
  s.useCodebaseAnnotations();
  state = (Activation) s.readObject();
}
origin: au.net.zeus.jgdms/jgdms-platform

throws IOException
super(check(in, context));
this.defaultLoader = defaultLoader;
this.verifyCodebaseIntegrity = verifyCodebaseIntegrity;
origin: au.net.zeus.jgdms/jgdms-platform

  public ClassLoader run() {
  return ((MarshalInputStream) input).getDefaultClassLoader();
  }
});
origin: xap/xap

logger.log(Level.FINER, "remarshalling verifier");
MarshalInputStream in =
    new MarshalInputStream(
        new ByteArrayInputStream(bout.toByteArray()),
        bcl, false, null, Collections.EMPTY_SET);
in.useCodebaseAnnotations();
verifier = (TrustVerifier) in.readObject();
in.close();
origin: au.net.zeus.jgdms/jgdms-platform

  new ByteArrayInputStream(bout.toByteArray()),
    bcl, false, null, Collections.EMPTY_SET, true);
in.useCodebaseAnnotations();
verifier = (TrustVerifier) in.readObject();
in.close();
origin: xap/xap

  /**
   * Reads and returns a class annotation string value (possibly <code>null</code>) that was
   * written by a corresponding <code>MarshalOutputStream</code> implementation.
   *
   * <p><code>MarshalInputStream</code> implements this method to just read the annotation value
   * from this stream using {@link ObjectInputStream#readObject readObject}, and if
   * <code>readObject</code> returns a non-<code>null</code> value that is not a
   * <code>String</code>, an {@link InvalidObjectException} is thrown.
   *
   * <p>A subclass can override this method to read the annotation from a different location.
   *
   * @return the class annotation string value read (possibly <code>null</code>)
   * @throws IOException            if an I/O exception occurs reading the annotation
   * @throws ClassNotFoundException if a <code>ClassNotFoundException</code> occurs reading the
   *                                annotation
   **/
  protected String readAnnotation()
      throws IOException, ClassNotFoundException {
    try {
      return (String) readObject();
    } catch (ClassCastException e) {
      InvalidObjectException ioe =
          new InvalidObjectException("annotation not String or null");
      ioe.initCause(e);
      throw ioe;
    }
  }
}
origin: xap/xap

String annotation = readAnnotation();
String codebase = usingCodebaseAnnotations ? annotation : null;
origin: au.net.zeus.jgdms/jgdms-platform

static class InputValidationDesc {
  ObjectInputValidation validator;
  int priority;
}
 
origin: xap/xap

  ObjectInputStream os = new MarshalInputStream(new OptimizedByteArrayInputStream(registrarBytes), Thread.currentThread().getContextClassLoader(), false, null, Collections.EMPTY_SET);
  return (ServiceRegistrar) os.readObject();
} finally {
origin: au.net.zeus.jgdms/jgdms-platform

  public ClassLoader run() {
  return ((MarshalInputStream) input).getVerifierClassLoader();
  }
});
origin: au.net.zeus.jgdms/jgdms-platform

  return (String) readObject();
} catch (ClassCastException e) {
  InvalidObjectException ioe =
origin: xap/xap

String annotation = readAnnotation();
String codebase = usingCodebaseAnnotations ? annotation : null;
origin: xap/xap

  context = Collections.EMPTY_SET;
ObjectInputStream os = new MarshalInputStream(new OptimizedByteArrayInputStream(registrarBytes), defaultLoader, false, null, context);
ServiceRegistrar reg = (ServiceRegistrar) os.readObject();
origin: au.net.zeus.jgdms.phoenix-activation/phoenix

  @Override
public void readUpdate(InputStream in) throws Exception {
  MarshalInputStream  s =
  new MarshalInputStream(in,
          ActLogHandler.class.getClassLoader(),
          false, null, Collections.EMPTY_LIST);
  s.useCodebaseAnnotations();
  applyUpdate(s.readObject());
}
origin: au.net.zeus.jgdms/jgdms-platform

String annotation = readAnnotation();
String codebase = usingCodebaseAnnotations ? annotation : null;
origin: au.net.zeus.jgdms/jgdms-platform

String annotation = readAnnotation();
String codebase = usingCodebaseAnnotations ? annotation : null;
net.jini.ioMarshalInputStream

Javadoc

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

MarshalInputStream implements the input side of the dynamic class loading semantics by overriding ObjectInputStream#resolveClass and ObjectInputStream#resolveProxyClass to resolve class descriptors in the stream using ClassLoading#loadClass and ClassLoading#loadProxyClass (which, in turn, use RMIClassLoader#loadClass(String,String,ClassLoader) and RMIClassLoader#loadProxyClass(String,String[],ClassLoader)), optionally with codebase annotation strings written by a MarshalOutputStream.

By default, a MarshalInputStream ignores all codebase annotation strings, instead using a codebase value of null when loading classes. Codebase annotation strings will only be used by a MarshalInputStream after its #useCodebaseAnnotations method has been invoked.

MarshalInputStream supports optional verification that all codebase annotation URLs that are used to load classes resolved by the stream provide content integrity (see Security#verifyCodebaseIntegrity). Whether or not a particular MarshalInputStream instance verifies that codebase annotation URLs provide content integrity is determined by the verifyCodebaseIntegrity constructor argument. See ClassLoading#loadClass and ClassLoading#loadProxyClass for details of how codebase integrity verification is performed.

MarshalInputStream reads class annotations from its own stream; a subclass can override the #readAnnotation method to read the class annotations from a different location.

A MarshalInputStream is not guaranteed to be safe for concurrent use by multiple threads.

Most used methods

  • readObject
  • useCodebaseAnnotations
    Enables the use of codebase annotation strings written by the corresponding MarshalOutputStream.If
  • <init>
  • close
  • readAnnotation
    Reads and returns a class annotation string value (possiblynull) that was written by a corresponding
  • check
  • getDefaultClassLoader
    The default class loader passed in during construction.
  • getVerifierClassLoader
    The verifier class loader passed in during construction.

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • JComboBox (javax.swing)
  • JPanel (javax.swing)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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