sclass ShortArrayInputStream_resettable extends InputStream { short[] buf; int idx; int mark_idx; bool bigEndian; *(short[] *buf) {} public bool markSupported() { true; } public void mark(int n) { mark_idx = idx; } public void reset() { idx = mark_idx; } public int read() { if (iBuf >= l(buf)*2) ret -1; short s = buf[iBuf/2]; int i = (odd(iBuf) != bigEndian ? s >> 8 : s) & 0xFF; iBuf++; ret i; } }