Package java.io

Examples of java.io.DataInputStream.readByte()


   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
      in.readByte(); // RESERVED block
      in.readByte(); // RESERVED block
      long mss = in.readUnsignedShort();
View Full Code Here


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

      int operationCode = in.readUnsignedByte();
      in.readByte(); // RESERVED block
      this.selectReport = in.readUnsignedByte();
      in.readByte(); // RESERVED block
      in.readByte(); // RESERVED block
      in.readByte(); // RESERVED block
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setAllocationLength((mss << 16) | lss);
View Full Code Here

      int operationCode = in.readUnsignedByte();
      in.readByte(); // RESERVED block
      this.selectReport = in.readUnsignedByte();
      in.readByte(); // RESERVED block
      in.readByte(); // RESERVED block
      in.readByte(); // RESERVED block
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setAllocationLength((mss << 16) | lss);
      in.readByte(); // RESERVED block
View Full Code Here

      int operationCode = in.readUnsignedByte();
      in.readByte(); // RESERVED block
      this.selectReport = in.readUnsignedByte();
      in.readByte(); // RESERVED block
      in.readByte(); // RESERVED block
      in.readByte(); // RESERVED block
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setAllocationLength((mss << 16) | lss);
      in.readByte(); // RESERVED block
      super.setControl(in.readUnsignedByte());
View Full Code Here

      in.readByte(); // RESERVED block
      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

      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;
      super.setControl(in.readUnsignedByte());

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

      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;
      in.readByte();
      this.parameterListLength = in.readUnsignedShort();
      super.setControl(in.readUnsignedByte());

      if (operationCode != OPERATION_CODE)
      {
View Full Code Here

      int cc;

      DataInputStream reader = new DataInputStream(is);

      // write TGA header
      reader.readByte(); // ID length, 0 because no image id field
      reader.readByte(); // no color map
      cc = reader.readByte(); // image type (24 bit RGB, uncompressed)
      if (cc != 2) {
        reader.close();
        System.out
View Full Code Here

      DataInputStream reader = new DataInputStream(is);

      // write TGA header
      reader.readByte(); // ID length, 0 because no image id field
      reader.readByte(); // no color map
      cc = reader.readByte(); // image type (24 bit RGB, uncompressed)
      if (cc != 2) {
        reader.close();
        System.out
            .println("TGATextureLoader: File is not 24bit RGB Data !");
View Full Code Here

      DataInputStream reader = new DataInputStream(is);

      // write TGA header
      reader.readByte(); // ID length, 0 because no image id field
      reader.readByte(); // no color map
      cc = reader.readByte(); // image type (24 bit RGB, uncompressed)
      if (cc != 2) {
        reader.close();
        System.out
            .println("TGATextureLoader: File is not 24bit RGB Data !");
        error = true;
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.