Examples of readUnsignedByte()


Examples of java.io.DataInputStream.readUnsignedByte()

      length = length < 0 ? 0 : length;

      // read in the next segment of the fixed format sense data
      byte[] cmdi = new byte[4];
      in.read(cmdi);
      int code = in.readUnsignedByte();
      int qualifier = in.readUnsignedByte();
      in.readByte();
      this.senseKeySpecificBuffer = new byte[3];
      in.read(this.senseKeySpecificBuffer);
      // the rest of the additional sense bytes are ignored
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

      // read in the next segment of the fixed format sense data
      byte[] cmdi = new byte[4];
      in.read(cmdi);
      int code = in.readUnsignedByte();
      int qualifier = in.readUnsignedByte();
      in.readByte();
      this.senseKeySpecificBuffer = new byte[3];
      in.read(this.senseKeySpecificBuffer);
      // the rest of the additional sense bytes are ignored
      // (vendor specific bytes not supported)
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

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

      // byte 0
      int b0 = in.readUnsignedByte();
      this.setPeripheralQualifier(b0 >>> 5);
      this.setPeripheralDeviceType(b0 & 0x1F);

      // byte 1
      int b1 = in.readUnsignedByte();
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

      int b0 = in.readUnsignedByte();
      this.setPeripheralQualifier(b0 >>> 5);
      this.setPeripheralDeviceType(b0 & 0x1F);

      // byte 1
      int b1 = in.readUnsignedByte();

      if (b1 != PAGE_CODE)
      {
         throw new IOException("invalid page code: " + Integer.toHexString(b1));
      }
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

      }

      this.setPageCode(b1);

      // byte 2
      in.readUnsignedByte();

      // byte 3
      int b3 = in.readUnsignedByte();

      // supported codes list
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

      // byte 2
      in.readUnsignedByte();

      // byte 3
      int b3 = in.readUnsignedByte();

      // supported codes list
      for (int i = b3; i > 0; i--)
      {
         this.supportedCodes.add(in.readUnsignedByte());
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

      int b3 = in.readUnsignedByte();

      // supported codes list
      for (int i = b3; i > 0; i--)
      {
         this.supportedCodes.add(in.readUnsignedByte());
      }
   }

   public byte[] encode()
   {
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

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

      int operationCode = in.readUnsignedByte();

      long msb = in.readUnsignedByte() & 0x1F;
      long lss = in.readUnsignedShort();
      setLogicalBlockAddress((msb << 16) | lss);
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

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

      int operationCode = in.readUnsignedByte();

      long msb = in.readUnsignedByte() & 0x1F;
      long lss = in.readUnsignedShort();
      setLogicalBlockAddress((msb << 16) | lss);

      setTransferLength(in.readUnsignedByte());
      if (getTransferLength() == 0)
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

      long msb = in.readUnsignedByte() & 0x1F;
      long lss = in.readUnsignedShort();
      setLogicalBlockAddress((msb << 16) | lss);

      setTransferLength(in.readUnsignedByte());
      if (getTransferLength() == 0)
      {
         setTransferLength(256);
      }
      super.setControl(in.readUnsignedByte());
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.