/** * Writes the cache out onto the underlying stream * @throws IOException */ protected void flushCache() throws IOException { if (this.cachePosition > 0) { this.out.writeLine(Integer.toHexString(this.cachePosition)); this.out.write(this.cache, 0, this.cachePosition); this.out.writeLine(""); this.cachePosition = 0; } }
public void write(int b) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } this.out.write(b); }
/** * Writes the cache and bufferToAppend to the underlying stream * as one large chunk * @param bufferToAppend * @param off * @param len * @throws IOException */ protected void flushCacheWithAppend(byte bufferToAppend[], int off, int len) throws IOException { this.out.writeLine(Integer.toHexString(this.cachePosition + len)); this.out.write(this.cache, 0, this.cachePosition); this.out.write(bufferToAppend, off, len); this.out.writeLine(""); this.cachePosition = 0; }
public void write(int b) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } if (this.total < this.contentLength) { this.out.write(b); this.total++; } }
/** * Writes the cache and bufferToAppend to the underlying stream * as one large chunk */ protected void flushCacheWithAppend(final byte bufferToAppend[], final int off, final int len) throws IOException { this.out.writeLine(Integer.toHexString(this.cachePosition + len)); this.out.write(this.cache, 0, this.cachePosition); this.out.write(bufferToAppend, off, len); this.out.writeLine(""); this.cachePosition = 0; }
public void write(byte[] b, int off, int len) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } this.out.write(b, off, len); }
/** * Writes the cache out onto the underlying stream * @throws IOException */ protected void flushCache() throws IOException { if (this.cachePosition > 0) { this.out.writeLine(Integer.toHexString(this.cachePosition)); this.out.write(this.cache, 0, this.cachePosition); this.out.writeLine(""); this.cachePosition = 0; } }
public void write(byte[] b, int off, int len) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } if (this.total < this.contentLength) { long max = this.contentLength - this.total; if (len > max) { len = (int) max; } this.out.write(b, off, len); this.total += len; } }
/** * Writes the cache out onto the underlying stream */ protected void flushCache() throws IOException { if (this.cachePosition > 0) { this.out.writeLine(Integer.toHexString(this.cachePosition)); this.out.write(this.cache, 0, this.cachePosition); this.out.writeLine(""); this.cachePosition = 0; } }
public void write(int b) throws IOException { this.out.write(b); if (this.wire.enabled()) { this.wire.output(b); } }
public void write(byte[] b, int off, int len) throws IOException { this.out.write(b, off, len); if (this.wire.enabled()) { this.wire.output(b, off, len); } }
public void write(byte[] b) throws IOException { this.out.write(b); if (this.wire.enabled()) { this.wire.output(b); } }
public void write(int b) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } if (this.total < this.contentLength) { this.out.write(b); this.total++; } }
public void write(int b) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } this.out.write(b); }
@Override public void write(final int b) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } if (this.total < this.contentLength) { this.out.write(b); this.total++; } }
@Override public void write(final byte[] b, final int off, final int len) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } this.out.write(b, off, len); }
@Override public void write(final int b) throws IOException { if (this.closed) { throw new IOException("Attempted write to closed stream."); } this.out.write(b); }
public void write(byte[] b, int off, int len) throws IOException { this.out.write(b, off, len); if (this.wire.enabled()) { this.wire.output(b, off, len); } }
public void write(int b) throws IOException { this.out.write(b); if (this.wire.enabled()) { this.wire.output(b); } }
public void write(byte[] b) throws IOException { this.out.write(b); if (this.wire.enabled()) { this.wire.output(b); } }