privatestaticvoid dotest(LineNumberInputStream in , int curpos , long total , long toskip , long expected) throws Exception
{
try {
System.err.println("\n\nCurrently at pos = " + curpos + "\nTotal bytes in the Stream = " + total + "\nNumber of bytes to skip = " + toskip + "\nNumber of bytes that should be skipped = " +
expected);
long skipped = in.skip(toskip);
System.err.println("actual number skipped: "+ skipped);
if ((skipped < 0) || (skipped > expected)) { thrownew RuntimeException("Unexpected number of bytes skipped");
}
} catch (IOException e) {
System.err.println("IOException is thrown - possible result");
} catch (Throwable e) { thrownew RuntimeException("Unexpected "+e+" is thrown!");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.