Examples of ByteBufferInputStream


Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

         throw new ModeSenseException("ModeSenseTask returned null");
      }

      try
      {
         DataInputStream in = new DataInputStream(new ByteBufferInputStream(data));

         int modeDataLength = in.readUnsignedByte();
         int mediumType = in.readUnsignedByte();
         in.readUnsignedByte(); // skip DEVICE-SPECIFIC PARAMETER
         int blockDescriptorLength = in.readUnsignedByte();
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

      return b;
   }

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

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

      long mss = in.readUnsignedShort();
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

   @SuppressWarnings("unchecked")
   public ModePage decode(ByteBuffer buffer) throws IOException
   {
      _logger.trace("Decoding mode page at buffer position: " + buffer.position());

      DataInputStream dataIn = new DataInputStream(new ByteBufferInputStream(buffer));

      boolean subPageFormat;
      byte[] header;

      dataIn.mark(0);
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

      this(peripheralQualifier, peripheralDeviceType, new LinkedList<IdentificationDescriptor>());
   }

   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);
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

      this(pcv, pageCode, false, false, allocationLength);
   }

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

      int operationCode = in.readUnsignedByte();
      this.PCV = (in.readUnsignedByte() & 1) == 1;
      this.pageCode = in.readUnsignedByte();
      setAllocationLength(in.readUnsignedShort());
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

   }

   @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());

      long mss = in.readUnsignedShort();
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

   }

   @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
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

      this.groupNumber = groupNumber;
   }

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

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

      long mss = in.readUnsignedShort();
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

      this(selectReport, false, false, allocationLength);
   }

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

      int operationCode = in.readUnsignedByte();
      in.readByte(); // RESERVED block
      this.selectReport = in.readUnsignedByte();
      in.readByte(); // RESERVED block
View Full Code Here

Examples of org.jscsi.scsi.protocol.util.ByteBufferInputStream

      this(pageFormat, savePages, parameterListLength, false, false);
   }

   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;
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.