asclass ShortInputStream { public int read(short[] destination) { ret read(destination, 0, l(destination)); } public int read(short[] destination, int off, int len) { int n = 0; while (n < len) { int i = read(); if (i == Int.MIN_VALUE) break; destination[off+n] = (short) i; n++; } ret n; } }