Examples of readUnsignedByte()


Examples of java.io.DataInputStream.readUnsignedByte()

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

         if (mediumType != 0x00)
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

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

         if (mediumType != 0x00)
            throw new ModeSenseException("medium type value invalid (expected 0x00, got "
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

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

         if (mediumType != 0x00)
            throw new ModeSenseException("medium type value invalid (expected 0x00, got "
                  + mediumType + ")");
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

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

         if (mediumType != 0x00)
            throw new ModeSenseException("medium type value invalid (expected 0x00, got "
                  + mediumType + ")");
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();
      this.decodeByte1(in.readUnsignedByte());

      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setLogicalBlockAddress((mss << 16) | lss);
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();
      this.decodeByte1(in.readUnsignedByte());

      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setLogicalBlockAddress((mss << 16) | lss);
View Full Code Here

Examples of java.io.DataInputStream.readUnsignedByte()

      long mss = in.readUnsignedShort();
      long lss = in.readUnsignedShort();
      setLogicalBlockAddress((mss << 16) | lss);

      this.groupNumber = in.readUnsignedByte() & 0x1F;
      setTransferLength(in.readUnsignedShort());
      super.setControl(in.readUnsignedByte());

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

Examples of java.io.DataInputStream.readUnsignedByte()

      long lss = in.readUnsignedShort();
      setLogicalBlockAddress((mss << 16) | lss);

      this.groupNumber = in.readUnsignedByte() & 0x1F;
      setTransferLength(in.readUnsignedShort());
      super.setControl(in.readUnsignedByte());

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

Examples of java.io.RandomAccessFile.readUnsignedByte()

      dataStream = new RandomAccessFile(filename, "r");

      // gets the header for file type identification
      int[] header = new int[4];
      for (int i = 0; i < header.length; i++)
        header[i] = dataStream.readUnsignedByte();

      // finds the right object
      int format = 0;
      for (format = 0; format < FORMATS.length; format++) {
        if (Arrays.equals(header, MAGIC_BYTES[format]))
View Full Code Here

Examples of javax.imageio.stream.ImageInputStream.readUnsignedByte()

                    try {
                        reclen = jpeg.readSegmentLength();
                        in.skipBytes(1); //data precision
                        in.skipBytes(2); //height
                        in.skipBytes(2); //width
                        int numComponents = in.readUnsignedByte();
                        if (numComponents == 1) {
                            colorSpace = ColorSpace.getInstance(
                              ColorSpace.CS_GRAY);
                        } else if (numComponents == 3) {
                            colorSpace = ColorSpace.getInstance(
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.