Lines Matching defs:sink
32 public static BufferedSink buffer(Sink sink) {
33 return new RealBufferedSink(sink);
36 /** Copies bytes from {@code source} to {@code sink}. */
37 public static void copy(OkBuffer source, long offset, long byteCount, OutputStream sink)
52 sink.write(s.data, pos, toWrite);
58 /** Returns a sink that writes to {@code out}. */
59 public static Sink sink(final OutputStream out) {
98 return "sink(" + out + ")";
108 @Override public long read(OkBuffer sink, long byteCount) throws IOException {
111 Segment tail = sink.writableSegment(1);
116 sink.size += bytesRead;