Package java.io

Examples of java.io.DataInputStream.readBoolean()


                    break;
                case VoldemortOpCode.GET_OP_CODE:
                    // Read the key just to skip the bytes.
                    readKey(inputStream);
                    if(protocolVersion > 2) {
                        boolean hasTransform = inputStream.readBoolean();
                        if(hasTransform) {
                            readTransforms(inputStream);
                        }
                    }
                    break;
View Full Code Here


                    // Read the keys to skip the bytes.
                    for(int i = 0; i < numKeys; i++)
                        readKey(inputStream);

                    if(protocolVersion > 2) {
                        boolean hasTransform = inputStream.readBoolean();
                        if(hasTransform) {
                            int numTrans = inputStream.readInt();
                            for(int i = 0; i < numTrans; i++) {
                                readTransforms(inputStream);
                            }
View Full Code Here

                    // Here we skip over the data (without reading it in) and
                    // move our position to just past it.
                    buffer.position(newPosition);
                    if(protocolVersion > 2) {
                        boolean hasTransform = inputStream.readBoolean();
                        if(hasTransform) {
                            readTransforms(inputStream);
                        }
                    }
                    break;
View Full Code Here

    protected void revalidate(QuorumPacket qp) throws IOException {
        ByteArrayInputStream bis = new ByteArrayInputStream(qp
                .getData());
        DataInputStream dis = new DataInputStream(bis);
        long sessionId = dis.readLong();
        boolean valid = dis.readBoolean();
        synchronized (pendingRevalidations) {
            ServerCnxn cnxn = pendingRevalidations
                    .remove(sessionId);
            if (cnxn == null) {
                LOG.warn("Missing session 0x"
View Full Code Here

    ByteArrayInputStream bais = new ByteArrayInputStream(enc);
    DataInputStream dis = new DataInputStream(bais);
   
    creationTime = dis.readLong();
   
    if (dis.readBoolean()) {
      server = dis.readUTF();
    } else {
      server = null;
    }
   
View Full Code Here

      server = dis.readUTF();
    } else {
      server = null;
    }
   
    if (dis.readBoolean()) {
      exception = dis.readUTF();
    } else {
      exception = null;
    }
  }
View Full Code Here

                        }

                        IValue value = null;
                        if ( readIn.available() > 1 && attribute != null )
                        {
                            boolean isString = readIn.readBoolean();
                            int size = readIn.readInt();
                            byte[] val = new byte[size];
                            readIn.read( val );
                            String test = new String( val, "UTF-8" ); //$NON-NLS-1$
View Full Code Here

    File snapshotFile = getSnapshotFile(confg);
    DataInputStream in = new DataInputStream(
        new BufferedInputStream(new FileInputStream(snapshotFile)));
    try {
      snapshot.readFields(in);
      if (in.readBoolean()) {
        LOG.info("Failover: Test framework - found fsck data");
        fsck = Text.readString(in);
      }
    } finally {
      in.close();
View Full Code Here

   */
  protected static class ReturnMessage extends Message {
    public static ReturnMessage receive(BrowserChannel channel)
        throws IOException {
      final DataInputStream stream = channel.getStreamFromOtherSide();
      final boolean isException = stream.readBoolean();
      final Value returnValue = channel.readValue(stream);
      return new ReturnMessage(channel, isException, returnValue);
    }

    public static void send(BrowserChannel channel, boolean isException,
View Full Code Here

    ByteArrayInputStream bais = new ByteArrayInputStream(enc);
    DataInputStream dis = new DataInputStream(bais);
   
    creationTime = dis.readLong();
   
    if (dis.readBoolean()) {
      server = dis.readUTF();
    } else {
      server = null;
    }
   
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.