Package net.jini.io

Examples of net.jini.io.MarshalOutputStream.writeObject()


                 child.getInputStream(),
                 child.getErrorStream());
        MarshalOutputStream out =
      new MarshalOutputStream(child.getOutputStream(),
            Collections.EMPTY_LIST);
        out.writeObject(id);
        ActivationGroupDesc gd = desc;
        if (gd.getClassName() == null) {
      MarshalledObject data = gd.getData();
      if (data == null) {
          data = groupData;
View Full Code Here


        loc,
        data,
        gd.getPropertyOverrides(),
        gd.getCommandEnvironment());
        }
        out.writeObject(gd);
        out.writeLong(incarnation);
        out.flush();
        out.close();
       
    } catch (Exception e) {
View Full Code Here

      if (state == null) {
    state = new Activation();
      }
      MarshalOutputStream s =
    new MarshalOutputStream(out, Collections.EMPTY_LIST);
      s.writeObject(state);
      s.flush();
  }
 
  public void recover(InputStream in) throws Exception {
      MarshalInputStream s =
View Full Code Here

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

  public void readUpdate(InputStream in) throws Exception {
      MarshalInputStream  s =
View Full Code Here

            ArrayList context = new ArrayList();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshalOutputStream output = new FakeMarshalOutputStream(
                baos,context,"http://foo.bar");
            output.writeObject(new File("test case " + (i+1)));
            output.close();

            // Attempt to read from MarshalInputStream

            ByteArrayInputStream bios = new ByteArrayInputStream(
View Full Code Here

            ArrayList context = new ArrayList();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshalOutputStream output = new FakeMarshalOutputStream(
                baos,context,writeAnnotationReturnVal);
            output.writeObject(transferObject);
            output.close();

            // Read transferObject from MarshalInputStream

            // Verifier shouldn't be called (so throw an exception if
View Full Code Here

            // Write transferObject to MarshalOutputStream
            ArrayList context = new ArrayList();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshalOutputStream output =
                new MarshalOutputStream(baos,context);
            output.writeObject(transferObject);
            output.close();

            // Read transferObject from MarshalInputStream
            ByteArrayInputStream bios =
                new ByteArrayInputStream(baos.toByteArray());
View Full Code Here

            // Write transferObject to MarshalOutputStream
            ArrayList context = new ArrayList();
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshalOutputStream output =
                new MarshalOutputStream(baos,context);
            output.writeObject(transferObject);
            output.close();

            // Read transferObject from MarshalInputStream
            ByteArrayInputStream bios =
                new ByteArrayInputStream(baos.toByteArray());
View Full Code Here

   * Serialize handler.
   */
  ByteArrayOutputStream bout = new ByteArrayOutputStream();
  MarshalOutputStream out =
      new MarshalOutputStream(bout, new HashSet());
  out.writeObject(aih);
  out.flush();
  byte[] bytes = bout.toByteArray();

  /*
   * Read in handler (should succeed).
View Full Code Here

   * serialize handler.
   */
  uproxy.setConstraints(new Constraints());
  bout.reset();
  out = new MarshalOutputStream(bout, new HashSet());
  out.writeObject(aih);
  out.flush();
  bytes = bout.toByteArray();

  /*
   * Read in handler (should fail with InvalidObjectException);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.