Package java.io

Examples of java.io.DataInputStream.skip()


        // ---------- Done Reading the TGA header ---------- //

        // Skip image ID
        if (idLength > 0) {
            dis.skip(idLength);
        }

        ColorMapEntry[] cMapEntries = null;
        if (colorMapType != 0) {
            // read the color map.
View Full Code Here


      int magic = dis.readInt(); // magic 0xCAFEBABE
      if (magic != 0xCAFEBABE) {
        throw new IllegalStateException("not bytecode, magic was 0x" + Integer.toString(magic, 16));
      }
      dis.skip(4);
      //      dis.readShort(); // minor
      //      dis.readShort(); // major
      cpsize = dis.readShort();
      if (DEBUG) {
        System.out.println("Constant Pool Size =" + cpsize);
View Full Code Here

      int magic = dis.readInt(); // magic 0xCAFEBABE
      if (magic != 0xCAFEBABE) {
        throw new IllegalStateException("not bytecode, magic was 0x" + Integer.toString(magic, 16));
      }
      dis.skip(4); // skip minor and major versions
      cpsize = dis.readShort();
      if (DEBUG) {
        System.out.println("Constant Pool Size =" + cpsize);
      }
      cpdata = new Object[cpsize];
View Full Code Here

        boolean doubleSlot = processConstantPoolEntry(cpentry, dis);
        if (doubleSlot) {
          cpentry++;
        }
      }
      dis.skip(2); // access flags
      int thisclassname = dis.readShort();
      int classindex = ((Integer) cpdata[thisclassname]);
      slashedclassname = (String) cpdata[classindex];
    } catch (Exception e) {
      throw new IllegalStateException("Unexpected problem processing bytes for class", e);
View Full Code Here

        if ((data[1] & 0xff) == 0x01 || ((data[1] & 0xff) >= 0xd0 && (data[1] & 0xff) <= 0xd7))
          continue;
        long length = (((data[2] & 0xff) << 8) | (data[3] & 0xff)) - 2;
        if ((data[1] & 0xff) != 0xc0) {
          while (length > 0) {
            long skipped = dis.skip(length);
            if (skipped == 0)
              break;
            length -= skipped;
          }
        } else {
View Full Code Here

        if (fileName == null) {
            ap.usage();
        } else {
            final IOMeter ioMeter = new IOMeter();
            final DataInputStream is = new DataInputStream(new BufferedInputStream(new FileInputStream(fileName)));
            is.skip(skip * DUMP_RECORD_LENGTH);
            ioMeter.dump(is, count == 0 ? Integer.MAX_VALUE : count, ap.isFlag('a'));
            is.close();
        }
    }
}
View Full Code Here

      ByteArrayInputStream bais = new ByteArrayInputStream(buf);
      DataInputStream in = new DataInputStream(new GZIPInputStream(bais));

      try {
        in.skip(blockOffset);

        int len = in.readInt();
        byte[] data = new byte[len];

        in.readFully(data);
View Full Code Here

        DataInputStream dis = new DataInputStream(new BufferedInputStream(is));
        RBBIDataWrapper This = new RBBIDataWrapper();
       
        // Seek past the ICU data header.
        //   TODO:  verify that the header looks good.
        dis.skip(0x80);
       
        // Read in the RBBI data header...
        This.fHeader = new  RBBIDataHeader();
        This.fHeader.fMagic          = dis.readInt();
        This.fHeader.fVersion        = dis.readInt();
View Full Code Here

        This.fHeader.fTrieLen        = dis.readInt();
        This.fHeader.fRuleSource     = dis.readInt();
        This.fHeader.fRuleSourceLen  = dis.readInt();
        This.fHeader.fStatusTable    = dis.readInt();
        This.fHeader.fStatusTableLen = dis.readInt();
        dis.skip(6 * 4);    // uint32_t  fReserved[6];
       
       
        if (This.fHeader.fMagic != 0xb1a0 ||
                ! (This.fHeader.fVersion == ||         // ICU 3.2 and earlier
                   This.fHeader.fFormatVersion[0] == 3)   // ICU 3.4
View Full Code Here

        if (This.fHeader.fFTable < pos || This.fHeader.fFTable > This.fHeader.fLength) {
             throw new IOException("Break iterator Rule data corrupt");
        }
       
        //    Skip over any padding preceding this table
        dis.skip(This.fHeader.fFTable - pos);
        pos = This.fHeader.fFTable;
       
        This.fFTable = new short[This.fHeader.fFTableLen / 2];
        for ( i=0; i<This.fFTable.length; i++) {
            This.fFTable[i] = dis.readShort();
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.