Package java.io

Examples of java.io.ObjectInputStream.readFully()


        if (i > 10 && i % (1000000 / 10) == 0)
          System.out.print(".");

        buffer = new byte[size];
        oiStream.readFully(buffer);
        transferred += size;

        ooStream.writeByte(0);
        ooStream.flush();
        oStream.flush();
View Full Code Here


        }
        break;

      case TAKE_OP:
        cookie = new byte[16];
        in.readFully(cookie);
        txnId = (Long)in.readObject();
        opOn.takeOp(cookie, txnId);
        break;

      case BATCH_TAKE_OP:
View Full Code Here

      case BATCH_TAKE_OP:
        txnId = (Long)in.readObject();
        count = in.readInt();
        for (int i=0; i<count; i++) {
      cookie = new byte[16];
      in.readFully(cookie);
      opOn.takeOp(cookie, txnId);
        }
        break;

      case REGISTER_OP:
View Full Code Here

        opOn.registerOp(registration);
        break;

      case RENEW_OP:
        cookie = new byte[16];
        in.readFully(cookie);
        long expires = in.readLong();
        opOn.renewOp(cookie, expires);
        break;

      case CANCEL_OP:
View Full Code Here

        opOn.renewOp(cookie, expires);
        break;

      case CANCEL_OP:
        cookie = new byte[16];
        in.readFully(cookie);
        opOn.cancelOp(cookie);
        break;

      case PREPARE_OP:
        txnId = (Long)in.readObject();
View Full Code Here

        opOn.abortOp(txnId);
        break;

      case UUID_OP:
        final byte uuid[] = new byte[16];
        in.readFully(uuid);
        opOn.uuidOp(uuid);
        break;

      default:
                    failure("log record corrupted, unknown opcode");
View Full Code Here

            int length = in.readInt();

            byte[] data = new byte[length];

            // The entry itself
            in.readFully( data );

            Entry entry = ( Entry ) entrySerializer.deserialize( data );
            entry.setDn( entryDn );

            // Read the changeType
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

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

                final int dataLen = ois.readInt();
                if (dataLen == -1)
                    data = null;
                else {
                    data = new byte[dataLen];
                    ois.readFully(data);
                }
                children = (Map<String, byte[]>) ois.readObject();
            } catch (IOException e) {
                throw new AssertionError(e);
            } catch (ClassNotFoundException e) {
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.