Package java.io

Examples of java.io.ObjectInputStream.available()


      assert in.read() == CacheMarshaller200.MAGICNUMBER_MARSHALLEDVALUE;
      MarshalledValue recreated = new MarshalledValue();
      recreated.readExternal(in);

      // there should be nothing more
      assert in.available() == 0;
      in.close();
      bin.close();

      assertSerialized(recreated);
      assert recreated.equals(mv);
View Full Code Here


            ByteArrayInputStream bais = new ByteArrayInputStream
                (data.getData(), data.getOffset(), data.getSize());
            try {
                ObjectInputStream ois = new ObjectInputStream(bais);
                Object object = ois.readObject();
                assert ois.available() == 0;
                if (object instanceof Data) {
                    oldData = (Data) object;
                } else {
                    if (!(object instanceof List)) {
                        throw DbCompat.unexpectedState
View Full Code Here

        ByteArrayInputStream bais = new ByteArrayInputStream
            (data.getData(), data.getOffset(), data.getSize());
        try {
            ObjectInputStream ois = new ObjectInputStream(bais);
            Object object = ois.readObject();
            assert ois.available() == 0;
           
            /* Set SyncDataSet's SyncProcessor field after de-serialization. */
            ProcessorMetadata<SyncDataSet> metadata =
                (ProcessorMetadata<SyncDataSet>) object;
            for (SyncDataSet dataSet : metadata.getDataSets()) {
View Full Code Here

      int available1 = 0;
      int available2 = 0;
      Object obj1 = null;
      Object obj2 = null;
      ObjectInputStream ois = new ObjectInputStream(loadStream());
      available1 = ois.available();
      obj1 = ois.readObject();
      available2 = ois.available();
      obj2 = ois.readObject();

      assertEquals("available returned incorrect value", 0, available1);
View Full Code Here

      Object obj1 = null;
      Object obj2 = null;
      ObjectInputStream ois = new ObjectInputStream(loadStream());
      available1 = ois.available();
      obj1 = ois.readObject();
      available2 = ois.available();
      obj2 = ois.readObject();

      assertEquals("available returned incorrect value", 0, available1);
      assertEquals("available returned incorrect value", 0, available2);
View Full Code Here

      int available1 = 0;
      int available2 = 0;
      Object obj1 = null;
      Object obj2 = null;
      ObjectInputStream ois = new ObjectInputStream(loadStream());
      available1 = ois.available();
      obj1 = ois.readObject();
      available2 = ois.available();
      obj2 = ois.readObject();

      assertEquals("available returned incorrect value", 0, available1);
View Full Code Here

      Object obj1 = null;
      Object obj2 = null;
      ObjectInputStream ois = new ObjectInputStream(loadStream());
      available1 = ois.available();
      obj1 = ois.readObject();
      available2 = ois.available();
      obj2 = ois.readObject();

      assertEquals("available returned incorrect value", 0, available1);
      assertEquals("available returned incorrect value", 0, available2);
View Full Code Here

      assert in.read() == CacheMarshaller200.MAGICNUMBER_MARSHALLEDVALUE;
      MarshalledValue recreated = new MarshalledValue();
      recreated.readExternal(in);

      // there should be nothing more
      assert in.available() == 0;
      in.close();
      bin.close();

      assertSerialized(recreated);
      assert recreated.equals(mv);
View Full Code Here

      int available1 = 0;
      int available2 = 0;
      Object obj1 = null;
      Object obj2 = null;
      ObjectInputStream ois = new ObjectInputStream(loadStream());
      available1 = ois.available();
      obj1 = ois.readObject();
      available2 = ois.available();
      obj2 = ois.readObject();

      assertEquals("available returned incorrect value", 0, available1);
View Full Code Here

      Object obj1 = null;
      Object obj2 = null;
      ObjectInputStream ois = new ObjectInputStream(loadStream());
      available1 = ois.available();
      obj1 = ois.readObject();
      available2 = ois.available();
      obj2 = ois.readObject();

      assertEquals("available returned incorrect value", 0, available1);
      assertEquals("available returned incorrect value", 0, available2);
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.