}
}
- public void write(int b) throws IOException {
+ @Override
+ public void write(int b) throws IOException {
// To avoid invoking the encoder/decoder routines for single
// bytes, we buffer up calls to write(int) in an internal
// byte array to transform them into writes of decently-sized
}
}
- public void write(byte[] b, int off, int len) throws IOException {
+ @Override
+ public void write(byte[] b, int off, int len) throws IOException {
if (len <= 0) return;
flushBuffer();
internalWrite(b, off, len, false);
}
- public void close() throws IOException {
+ @Override
+ public void close() throws IOException {
IOException thrown = null;
try {
flushBuffer();
private byte[] embiggen(byte[] b, int len) {
if (b == null || b.length < len) {
return new byte[len];
- } else {
- return b;
}
+ return b;
}
}