Package java.io

Examples of java.io.ObjectInputStream.available()


            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) {
                    catalogData = (Data) object;
                } else {
                    if (!(object instanceof List)) {
                        throw new IllegalStateException
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

      String portletHandle;
      byte[] portletState;
     
      portletHandle = ois.readUTF();
     
      if (ois.available() > 0)
      {
         portletState = new byte[ois.available()];
         ois.readFully(portletState);
      }
      else
View Full Code Here

     
      portletHandle = ois.readUTF();
     
      if (ois.available() > 0)
      {
         portletState = new byte[ois.available()];
         ois.readFully(portletState);
      }
      else
      {
         portletState = null;
View Full Code Here

         String type = ois.readUTF();
         Double version = ois.readDouble();

         byte[] internalBytes = null;
         if (ois.available() > 0)
         {
            internalBytes = new byte[ois.available()];
            ois.readFully(internalBytes);
         }
         return internalBytes;
View Full Code Here

         Double version = ois.readDouble();

         byte[] internalBytes = null;
         if (ois.available() > 0)
         {
            internalBytes = new byte[ois.available()];
            ois.readFully(internalBytes);
         }
         return internalBytes;
      }
      else
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) {
                    catalogData = (Data) object;
                } else {
                    if (!(object instanceof List)) {
                        throw DbCompat.unexpectedState
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.