public void unread(byte[] buffer, int offset, int length) throws TIOException {
if (length > pos) {
throw new TIOException(TString.wrap("Pushback buffer full"));
}
if (offset > buffer.length || offset < 0) {
throw new TArrayIndexOutOfBoundsException(TString.wrap("Offset out of bounds: " + offset));
}
if (length < 0 || length > buffer.length - offset) {
throw new TArrayIndexOutOfBoundsException(TString.wrap("Length out of bounds: " + length));
}
if (buf == null) {
throw new TIOException(TString.wrap("Stream is closed"));
}
System.arraycopy(buffer, offset, buf, pos - length, length);