private OutputStream setupOutputStream(OutputStream os) { if (!(os instanceof AbstractWrappedOutputStream)) { os = new AbstractWrappedOutputStream(os) { }; } ((AbstractWrappedOutputStream)os).allowFlush(false); return os; }
@Override public void write(byte[] b, int off, int len) throws IOException { if (!written) { onFirstWrite(); written = true; } if (wrappedStream != null) { wrappedStream.write(b, off, len); } }
@Override public void write(byte[] b) throws IOException { write(b, 0, b.length); }
public void close() throws IOException { if (!written) { dispatchToService(true); } super.close(); }
public void close() throws IOException { if (!written) { dispatchToClient(true); } super.close(); }
@Override public void write(byte[] b) throws IOException { write(b, 0, b.length); }
public void close() throws IOException { if (!written) { dispatchToClient(true); } super.close(); }
@Override public void write(byte[] b, int off, int len) throws IOException { if (!written) { onFirstWrite(); written = true; } if (wrappedStream != null) { wrappedStream.write(b, off, len); } }
private OutputStream setupOutputStream(OutputStream os) { if (!(os instanceof AbstractWrappedOutputStream)) { os = new AbstractWrappedOutputStream(os) { }; } ((AbstractWrappedOutputStream)os).allowFlush(false); return os; }
@Override public void write(byte[] b) throws IOException { write(b, 0, b.length); }
public void close() throws IOException { if (!written) { dispatchToService(true); } super.close(); }
@Override public void write(int b) throws IOException { if (!written) { onFirstWrite(); written = true; } if (wrappedStream != null) { wrappedStream.write(b); } }
private OutputStream setupOutputStream(Message message, OutputStream os) { if (!(os instanceof AbstractWrappedOutputStream)) { os = new AbstractWrappedOutputStream(os) { }; } ((AbstractWrappedOutputStream)os).allowFlush(false); return os; }
@Override public void write(byte[] b) throws IOException { write(b, 0, b.length); }
@Override public void close() throws IOException { if (buffer != null) { thresholdNotReached(); unBuffer(); } super.close(); }
@Override public void write(int b) throws IOException { if (!written) { onFirstWrite(); written = true; } if (wrappedStream != null) { wrappedStream.write(b); } }
private OutputStream setupOutputStream(Message message, OutputStream os) { if (!(os instanceof AbstractWrappedOutputStream)) { os = new AbstractWrappedOutputStream(os) { }; } ((AbstractWrappedOutputStream)os).allowFlush(false); return os; }
public void unBuffer() throws IOException { if (buffer != null) { if (buffer.size() > 0) { super.write(buffer.getRawBytes(), 0, buffer.size()); } buffer = null; } }
@Override public void close() throws IOException { if (buffer != null) { thresholdNotReached(); unBuffer(); } super.close(); }
@Override public void write(int b) throws IOException { if (!written) { onFirstWrite(); written = true; } if (wrappedStream != null) { wrappedStream.write(b); } }