@Override public void write(Buffer source, long byteCount) throws IOException { if (closed) throw new IllegalStateException("closed"); if (byteCount == 0) return; sink.writeHexadecimalUnsignedLong(byteCount); sink.writeUtf8("\r\n"); sink.write(source, byteCount); sink.writeUtf8("\r\n"); }
@Override public void write(Buffer source, long byteCount) throws IOException { if (closed) throw new IllegalStateException("closed"); if (byteCount == 0) return; sink.writeHexadecimalUnsignedLong(byteCount); sink.writeUtf8("\r\n"); sink.write(source, byteCount); sink.writeUtf8("\r\n"); }
private void assertLongHexString(long value) throws IOException { sink.writeHexadecimalUnsignedLong(value).writeUtf8("zzz").flush(); String expected = String.format("%x", value) + "zzz"; String actual = data.readUtf8(); assertEquals(value + " expected " + expected + " but was " + actual, actual, expected); } }
@Override public void write(Buffer source, long byteCount) throws IOException { if (closed) throw new IllegalStateException("closed"); if (byteCount == 0) return; sink.writeHexadecimalUnsignedLong(byteCount); sink.writeUtf8("\r\n"); sink.write(source, byteCount); sink.writeUtf8("\r\n"); }
@Override public void write(Buffer source, long byteCount) throws IOException { if (closed) throw new IllegalStateException("closed"); if (byteCount == 0) return; sink.writeHexadecimalUnsignedLong(byteCount); sink.writeUtf8("\r\n"); sink.write(source, byteCount); sink.writeUtf8("\r\n"); }
@Override public void write(Buffer source, long byteCount) throws IOException { if (closed) throw new IllegalStateException("closed"); if (byteCount == 0) return; sink.writeHexadecimalUnsignedLong(byteCount); sink.writeUtf8("\r\n"); sink.write(source, byteCount); sink.writeUtf8("\r\n"); }
@Override public void write(Buffer source, long byteCount) throws IOException { if (closed) throw new IllegalStateException("closed"); if (byteCount == 0) return; sink.writeHexadecimalUnsignedLong(byteCount); sink.writeUtf8("\r\n"); sink.write(source, byteCount); sink.writeUtf8("\r\n"); }
@Override public void write(Buffer source, long byteCount) throws IOException { if (closed) throw new IllegalStateException("closed"); if (byteCount == 0) return; sink.writeHexadecimalUnsignedLong(byteCount); sink.writeUtf8("\r\n"); sink.write(source, byteCount); sink.writeUtf8("\r\n"); }