Package java.io

Examples of java.io.DataInputStream.readUnsignedByte()


      this.SP = (tmp & 0x01) != 0;
      this.PF = (tmp >>> 4) != 0;
      tmp = in.readInt();
      tmp = in.readByte();
      this.setParameterLength(in.readUnsignedShort());
      super.setControl(in.readUnsignedByte());

      if (operationCode != OPERATION_CODE)
      {
         throw new IOException("Invalid operation code: " + Integer.toHexString(operationCode));
      }
View Full Code Here


   public void decode(byte[] header, ByteBuffer input) throws IOException
   {
      DataInputStream in = new DataInputStream(new ByteBufferInputStream(input));
      int tmp;

      int operationCode = in.readUnsignedByte();
      tmp = in.readUnsignedByte();
      this.setDBD((tmp & 0x08) != 0);
      tmp >>>= 4;
      this.LLBAA = (tmp & 0x01) != 0;
      tmp = in.readUnsignedByte();
View Full Code Here

   {
      DataInputStream in = new DataInputStream(new ByteBufferInputStream(input));
      int tmp;

      int operationCode = in.readUnsignedByte();
      tmp = in.readUnsignedByte();
      this.setDBD((tmp & 0x08) != 0);
      tmp >>>= 4;
      this.LLBAA = (tmp & 0x01) != 0;
      tmp = in.readUnsignedByte();
      this.setPageCode(tmp & 0x3F);
View Full Code Here

      int operationCode = in.readUnsignedByte();
      tmp = in.readUnsignedByte();
      this.setDBD((tmp & 0x08) != 0);
      tmp >>>= 4;
      this.LLBAA = (tmp & 0x01) != 0;
      tmp = in.readUnsignedByte();
      this.setPageCode(tmp & 0x3F);
      this.setPC(tmp >>> 6);
      this.setSubPageCode(in.readUnsignedByte());
      in.readShort(); // first part of RESERVED block
      in.readByte(); // remaining RESERVED block
View Full Code Here

      tmp >>>= 4;
      this.LLBAA = (tmp & 0x01) != 0;
      tmp = in.readUnsignedByte();
      this.setPageCode(tmp & 0x3F);
      this.setPC(tmp >>> 6);
      this.setSubPageCode(in.readUnsignedByte());
      in.readShort(); // first part of RESERVED block
      in.readByte(); // remaining RESERVED block
      setAllocationLength(in.readUnsignedShort());

      super.setControl(in.readUnsignedByte());
View Full Code Here

      this.setSubPageCode(in.readUnsignedByte());
      in.readShort(); // first part of RESERVED block
      in.readByte(); // remaining RESERVED block
      setAllocationLength(in.readUnsignedShort());

      super.setControl(in.readUnsignedByte());

      if (operationCode != OPERATION_CODE)
      {
         throw new IOException("Invalid operation code: " + Integer.toHexString(operationCode));
      }
View Full Code Here

   @Override
   public void decode(byte[] header, ByteBuffer input) throws IOException
   {
      DataInputStream in = new DataInputStream(new ByteBufferInputStream(input));

      int operationCode = in.readUnsignedByte();
      super.decodeByte1(in.readUnsignedByte());

      // CAUTION: Signed longs represent unsigned longs
      setLogicalBlockAddress(in.readLong());
      long mss = in.readUnsignedShort();
View Full Code Here

   public void decode(byte[] header, ByteBuffer input) throws IOException
   {
      DataInputStream in = new DataInputStream(new ByteBufferInputStream(input));

      int operationCode = in.readUnsignedByte();
      super.decodeByte1(in.readUnsignedByte());

      // CAUTION: Signed longs represent unsigned longs
      setLogicalBlockAddress(in.readLong());
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
View Full Code Here

      // CAUTION: Signed longs represent unsigned longs
      setLogicalBlockAddress(in.readLong());
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setTransferLength((mss << 16) | lss);
      setGroupNumber(in.readUnsignedByte() & 0x1F);
      super.setControl(in.readUnsignedByte());

      if (operationCode != OPERATION_CODE)
      {
         throw new IOException("Invalid operation code: " + Integer.toHexString(operationCode));
View Full Code Here

      setLogicalBlockAddress(in.readLong());
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setTransferLength((mss << 16) | lss);
      setGroupNumber(in.readUnsignedByte() & 0x1F);
      super.setControl(in.readUnsignedByte());

      if (operationCode != OPERATION_CODE)
      {
         throw new IOException("Invalid operation code: " + Integer.toHexString(operationCode));
      }
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.