Package java.io

Examples of java.io.DataInputStream.readUnsignedByte()


      in.readByte(); // RESERVED block
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setAllocationLength((mss << 16) | lss);
      in.readByte(); // RESERVED block
      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.SP = (tmp & 0x01) != 0;
      this.PF = (tmp >>> 4) != 0;
      tmp = in.readShort();
      this.setParameterLength(in.readUnsignedByte());
View Full Code Here

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

      int operationCode = in.readUnsignedByte();
      tmp = in.readUnsignedByte();
      this.SP = (tmp & 0x01) != 0;
      this.PF = (tmp >>> 4) != 0;
      tmp = in.readShort();
      this.setParameterLength(in.readUnsignedByte());
      super.setControl(in.readUnsignedByte());
View Full Code Here

      int operationCode = in.readUnsignedByte();
      tmp = in.readUnsignedByte();
      this.SP = (tmp & 0x01) != 0;
      this.PF = (tmp >>> 4) != 0;
      tmp = in.readShort();
      this.setParameterLength(in.readUnsignedByte());
      super.setControl(in.readUnsignedByte());

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

      tmp = in.readUnsignedByte();
      this.SP = (tmp & 0x01) != 0;
      this.PF = (tmp >>> 4) != 0;
      tmp = in.readShort();
      this.setParameterLength(in.readUnsignedByte());
      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 operationCode = in.readUnsignedByte();
      int serviceAction = in.readUnsignedByte() & 0x1F;
      this.logicalBlockAddress = in.readLong();
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setAllocationLength((mss << 16) | lss);
View Full Code Here

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

      int operationCode = in.readUnsignedByte();
      int serviceAction = in.readUnsignedByte() & 0x1F;
      this.logicalBlockAddress = in.readLong();
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setAllocationLength((mss << 16) | lss);
      this.PMI = (in.readByte() & 0x01) == 1;
View Full Code Here

      this.logicalBlockAddress = in.readLong();
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setAllocationLength((mss << 16) | lss);
      this.PMI = (in.readByte() & 0x01) == 1;
      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 operationCode = in.readUnsignedByte();
      int tmp = in.readUnsignedByte();
      this.unitOffL = (tmp & 0x01) == 1;
      this.devOffL = ((tmp >>> 1) & 1) == 1;
      this.selfTest = ((tmp >>> 2) & 1) == 1;
      this.PF = ((tmp >>> 4) & 1) == 1;
View Full Code Here

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

      int operationCode = in.readUnsignedByte();
      int tmp = in.readUnsignedByte();
      this.unitOffL = (tmp & 0x01) == 1;
      this.devOffL = ((tmp >>> 1) & 1) == 1;
      this.selfTest = ((tmp >>> 2) & 1) == 1;
      this.PF = ((tmp >>> 4) & 1) == 1;
      this.selfTestCode = (tmp >>> 5) & 7;
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.