Package java.io

Examples of java.io.DataInputStream.readByte()


        error = true;
        return false;
      }
      reader.readShort(); // color map origin, ignore because no color map
      reader.readShort(); // color map length, ignore because no color map
      reader.readByte(); // color map entry size, ignore because no color
                // map
      reader.readShort(); // x origin
      reader.readShort(); // y origin

      cc = reader.readByte(); // image width low byte
View Full Code Here


      reader.readByte(); // color map entry size, ignore because no color
                // map
      reader.readShort(); // x origin
      reader.readShort(); // y origin

      cc = reader.readByte(); // image width low byte
      short s = (short) ((short) cc & 0x00ff);
      cc = reader.readByte(); // image width high byte
      s = (short) ((short) (((short) cc & 0x00ff) << 8) | s);
      imageWidth = (int) s;
View Full Code Here

      reader.readShort(); // x origin
      reader.readShort(); // y origin

      cc = reader.readByte(); // image width low byte
      short s = (short) ((short) cc & 0x00ff);
      cc = reader.readByte(); // image width high byte
      s = (short) ((short) (((short) cc & 0x00ff) << 8) | s);
      imageWidth = (int) s;

      cc = reader.readByte(); // image height low byte
      s = (short) ((short) cc & 0x00ff);
View Full Code Here

      short s = (short) ((short) cc & 0x00ff);
      cc = reader.readByte(); // image width high byte
      s = (short) ((short) (((short) cc & 0x00ff) << 8) | s);
      imageWidth = (int) s;

      cc = reader.readByte(); // image height low byte
      s = (short) ((short) cc & 0x00ff);
      cc = reader.readByte(); // image height high byte
      s = (short) ((short) (((short) cc & 0x00ff) << 8) | s);
      imageHeight = (int) s;
View Full Code Here

      s = (short) ((short) (((short) cc & 0x00ff) << 8) | s);
      imageWidth = (int) s;

      cc = reader.readByte(); // image height low byte
      s = (short) ((short) cc & 0x00ff);
      cc = reader.readByte(); // image height high byte
      s = (short) ((short) (((short) cc & 0x00ff) << 8) | s);
      imageHeight = (int) s;

      cc = reader.readByte(); // 24bpp
      if (cc != 24) {
View Full Code Here

      s = (short) ((short) cc & 0x00ff);
      cc = reader.readByte(); // image height high byte
      s = (short) ((short) (((short) cc & 0x00ff) << 8) | s);
      imageHeight = (int) s;

      cc = reader.readByte(); // 24bpp
      if (cc != 24) {
        reader.close();
        System.out
            .println("TGATextureLoader: File is not 24bpp Data !");
        error = true;
View Full Code Here

        System.out
            .println("TGATextureLoader: File is not 24bpp Data !");
        error = true;
        return false;
      }
      reader.readByte(); // description bits

      pixel = new byte[imageWidth * imageHeight * 3];

      // read TGA image data
      // reader.read(pixel, 0, pixel.length);
View Full Code Here

      int operationCode = in.readUnsignedByte();
      tmp = in.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)
      {
View Full Code Here

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

      if (operationCode != OPERATION_CODE)
View Full Code Here

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

      int operationCode = in.readUnsignedByte();
      in.readByte();
      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      this.logicalBlockAddress = (mss << 16) | lss;
      in.readShort();
      this.PMI = (in.readUnsignedByte() & 1) != 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.