Examples of skip()


Examples of java.io.InputStream.skip()

        }
        InputStream in = getBinaryStream();
        try {
          long skipped = 0;
          while (pos > 0) {
            skipped = in.skip(pos);
            pos -= skipped;
          }
          return ObjectConverterUtil.convertToByteArray(in, length);
        } catch (IOException e) {
          throw new SQLException(e);
View Full Code Here

Examples of java.io.InputStreamReader.skip()

            char[] cbuf = new char[bufferSize];

            long skipped = 0;
            long totalSkipped = 0;
            while (totalSkipped < start) {
              skipped = reader.skip(start - totalSkipped);
              totalSkipped += skipped;
            }

            int len = 0;
            int currentToRead = toRead > bufferSize ? bufferSize : (int) toRead;
View Full Code Here

Examples of java.io.LineNumberInputStream.skip()

        byte[] data = {12, 13, 10, 23, 11, 13, 12, 10, 13};
        byte[] expected = {12, 10, 23, 11, 10, 12, 10, 10};

        LineNumberInputStream in =
            new LineNumberInputStream(new ByteArrayInputStream(data));
        long skipped = in.skip(3); // skip 3 bytes
        if ((skipped == 3) && ((in.read()) != 11)) {
            throw new
                RuntimeException("LineNumberInputStream.skip - " +
                                 "unexpected results!");
        }
View Full Code Here

Examples of java.io.LineNumberReader.skip()

        // Find the line number(s) being modified
        // TODO: this could be more efficient
        try {
          LineNumberReader lineNumberReader =
              new LineNumberReader(new StringReader(source.toString()));
          lineNumberReader.skip(repl.startPosition());
          modifiedLines.add(lineNumberReader.getLineNumber());
        } catch (IOException e) {
          // impossible since source is in-memory
        }
      }
View Full Code Here

Examples of java.io.ObjectInputStream.skip()

            while (inputId.equals(id) == false) {
                byte zoneCount = in.readByte();
                for (int i = 0; i < zoneCount; i++) {
                    in.readUTF();
                }
                in.skip(5);
                inputId = in.readUTF();
                if (inputId.length() == 0) {
                    throw new IllegalArgumentException("Territory " + id + " could not be loaded");
                }
            }
View Full Code Here

Examples of java.io.PushbackInputStream.skip()

                                    if (buf[0] == (byte)0xff &&
                                            buf[1] == (byte)0xfe) {
                                        if (read >= 4 && buf[2] == 0 &&
                                                buf[3] == 0) {
                                            enc = "UTF32-LE";
                                            pbis.skip(4);
                                        } else {
                                            enc = "UTF-16LE";
                                            pbis.skip(2);
                                        }
                                    } else if (buf[0] == (byte)0xfe &&
View Full Code Here

Examples of java.io.PushbackReader.skip()

      PushbackReader pReader = new PushbackReader(reader, 2);
      PushbackReader pReader2 = new PushbackReader(reader2, 2);
      boolean skipped = false;
      long numSkipped = 0;
      try {
        numSkipped = pReader2.skip(3);
        pReader2.unread('a');
        pReader2.unread('b');
        numSkipped += pReader2.skip(10);
        numSkipped += pReader2.skip(10);
        numSkipped += pReader2.skip(10);
View Full Code Here

Examples of java.io.Reader.skip()

        Reader in = getCharacterStream();
        try {
          try {
            long skipped = 0;
            while (pos > 0) {
              skipped = in.skip(pos);
              pos -= skipped;
            }
            return new String(ObjectConverterUtil.convertToCharArray(in, length));
          } finally {
            in.close();
View Full Code Here

Examples of java.io.StringReader.skip()

    boolean started = false;
    boolean endMarked = false;
    final StringBuffer afterBlockBuffer = new StringBuffer();

    try {
      final long ns = sr.skip(lt.getCharStart());
      index += ns;
      while ((c = sr.read()) != -1) {
        if (started && la == ra) {
          if (!endMarked) {
            lt.setCharEnd(index);
View Full Code Here

Examples of java.util.Scanner.skip()

    for (i = 0; i < values.length; i++)
      {
  tmpStr = s.next ();
  myHarness.check(tmpStr.equals (values[i]), tmpStr + " = " + values[i]);
  s = s.skip (" ").skip ("fish");
      }

  }

}
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.