Package java.io

Examples of java.io.DataInput.skipBytes()


        int sig = din.readInt();
        if (sig != NCL2) {
            throw new UnsupportedOperationException("Unsupported structure type: "
                    + toSignatureString(sig) + ". Expected " + toSignatureString(NCL2));
        }
        din.skipBytes(8);
        int numColors = din.readInt();
        NamedColorSpace[] result = new NamedColorSpace[numColors];
        int numDeviceCoord = din.readInt();
        String prefix = readAscii(din, 32);
        String suffix = readAscii(din, 32);
View Full Code Here


                dis = new LEDataInputStream(stream);
            }

            double[] array = new double[n2 - n1];

            dis.skipBytes(n1 * 4);
            for (int i = 0; i < array.length; i++) {
                array[i] = dis.readDouble();
            }

            return array;
View Full Code Here

              "load image. The IFF file's bitmap header " +
              "contains invalid width and height values: " +
              width + ", " + height);
          }
          // next four bytes don't matter
          in.skipBytes(4);
          // color depth, 1..8 or 24
          numPlanes = in.readByte();
          if ((numPlanes != 24) && (numPlanes < 1 || numPlanes > 8))
          {
            throw new UnsupportedTypeException("Cannot load " +
View Full Code Here

            throw new UnsupportedTypeException("Cannot load " +
              "image, unsupported compression type: " +
              compression);
          }
          //System.out.println(getCompressionName(compression));
          in.skipBytes(9);
          hasBMHD = true;
          break;
        }
        case(MAGIC_BODY):
        {
View Full Code Here

          }
          camg = in.readInt();
          ham = (camg & 0x800) != 0;
          ehb = (camg & 0x80) != 0;
          //System.out.println("ham=" + ham);
          in.skipBytes(size - 4);
          break;
        }
        case(MAGIC_CMAP): // palette (color map)
        {
          if (palette != null)
View Full Code Here

          }
          break;
        }
        default:
        {
          if (in.skipBytes(size) != size)
          {
            throw new IOException("Error skipping " + size +
              " bytes of input stream.");
          }
          break;
View Full Code Here

                dis = new LEDataInputStream(stream);
            }

            double[] array = new double[n2 - n1];

            dis.skipBytes(n1 * 4);
            for (int i = 0; i < array.length; i++) {
                array[i] = dis.readDouble();
            }

            return array;
View Full Code Here

                    try {
                        reclen = jpeg.readSegmentLength();
                        // Check for ICC profile
                        byte[] iccString = new byte[11];
                        din.readFully(iccString);
                        din.skipBytes(1); //string terminator (null byte)

                        if ("ICC_PROFILE".equals(new String(iccString, "US-ASCII"))) {
                            skipICCProfile = (this.image.getICCProfile() != null);
                        }
                    } finally {
View Full Code Here

       
        in.close();
       
        // re-open the stream and load the contents
        DataInput din = new DataInputStream(Setup.class.getResourceAsStream("Setup.class"));
        din.skipBytes(start);
        din.readFully(payload);

        // de-scramble
        for( i=0; i<payload.length; i++ )
            payload[i] ^= 0xAA;
View Full Code Here

//                    System.out.println("We have ACON. Next!");
                    nextInt = getNext(leIn);
                    while (nextInt >= 0) {
                        if (nextInt == 0x68696e61) {
//                            System.out.println("we have 'anih' header");
                            leIn.skipBytes(8); // internal struct length (always 36)
                            numIcons = leIn.readInt();
                            steps = leIn.readInt(); // number of blits for ani cycles
                            width = leIn.readInt();
                            height = leIn.readInt();
                            leIn.skipBytes(8);
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.