Home
last modified time | relevance | path

Searched refs:sink (Results 1 – 25 of 534) sorted by relevance

12345678910>>...22

/external/okhttp/okio/okio/src/test/java/okio/
DBufferedSinkTest.java79 private BufferedSink sink;
83 sink = factory.create(data);
87 sink.writeUtf8("");
88 sink.flush();
93 sink.writeByte(0xab);
94 sink.writeByte(0xcd);
95 sink.flush();
100 sink.writeUtf8(repeat('a', Segment.SIZE - 1));
101 sink.writeByte(0x20);
102 sink.writeByte(0x21);
[all …]
DBufferedSourceTest.java44 result.sink = buffer;
58 result.sink = buffer;
72 result.sink = buffer;
74 @Override public long read(Buffer sink, long byteCount) throws IOException {
75 return super.read(sink, Math.min(byteCount, 1L));
91 BufferedSink sink; field in BufferedSourceTest.Pipe
113 private BufferedSink sink; field in BufferedSourceTest
118 sink = pipe.sink; in setUp()
123 sink.write(new byte[] { (byte) 0xab, (byte) 0xcd }); in readBytes()
130 sink.write(new byte[] { in readShort()
[all …]
DOkioTest.java38 BufferedSink sink = Okio.buffer(Okio.sink(file)); in readWriteFile() local
39 sink.writeUtf8("Hello, java.io file!"); in readWriteFile()
40 sink.close(); in readWriteFile()
52 BufferedSink sink = Okio.buffer(Okio.appendingSink(file)); in appendFile() local
53 sink.writeUtf8("Hello, "); in appendFile()
54 sink.close(); in appendFile()
58 sink = Okio.buffer(Okio.appendingSink(file)); in appendFile()
59 sink.writeUtf8("java.io file!"); in appendFile()
60 sink.close(); in appendFile()
91 Sink sink = Okio.sink(out); in sinkFromOutputStream() local
[all …]
DRealBufferedSinkTest.java32 RealBufferedSink sink = new RealBufferedSink(new Buffer()); in inputStreamCloses() local
33 OutputStream out = sink.outputStream(); in inputStreamCloses()
36 sink.writeUtf8("Hi!"); in inputStreamCloses()
44 Buffer sink = new Buffer(); in bufferedSinkEmitsTailWhenItIsComplete() local
45 BufferedSink bufferedSink = new RealBufferedSink(sink); in bufferedSinkEmitsTailWhenItIsComplete()
47 assertEquals(0, sink.size()); in bufferedSinkEmitsTailWhenItIsComplete()
49 assertEquals(Segment.SIZE, sink.size()); in bufferedSinkEmitsTailWhenItIsComplete()
54 Buffer sink = new Buffer(); in bufferedSinkEmitMultipleSegments() local
55 BufferedSink bufferedSink = new RealBufferedSink(sink); in bufferedSinkEmitMultipleSegments()
57 assertEquals(Segment.SIZE * 3, sink.size()); in bufferedSinkEmitMultipleSegments()
[all …]
DDeflaterSinkTest.java35 Buffer sink = new Buffer(); in deflateWithClose() local
36 DeflaterSink deflaterSink = new DeflaterSink(sink, new Deflater()); in deflateWithClose()
39 Buffer inflated = inflate(sink); in deflateWithClose()
47 Buffer sink = new Buffer(); in deflateWithSyncFlush() local
48 DeflaterSink deflaterSink = new DeflaterSink(sink, new Deflater()); in deflateWithSyncFlush()
51 Buffer inflated = inflate(sink); in deflateWithSyncFlush()
59 Buffer sink = new Buffer(); in deflateWellCompressed() local
60 DeflaterSink deflaterSink = new DeflaterSink(sink, new Deflater()); in deflateWellCompressed()
63 Buffer inflated = inflate(sink); in deflateWellCompressed()
71 Buffer sink = new Buffer(); in deflatePoorlyCompressed() local
[all …]
/external/guava/guava-tests/test/com/google/common/hash/
DAbstractStreamingHasherTest.java44 Sink sink = new Sink(4); // byte order insignificant here in testBytes() local
46 sink.putByte((byte) 1); in testBytes()
47 sink.putBytes(new byte[] { 2, 3, 4, 5, 6 }); in testBytes()
48 sink.putByte((byte) 7); in testBytes()
49 sink.putBytes(new byte[] {}); in testBytes()
50 sink.putBytes(new byte[] { 8 }); in testBytes()
51 sink.hash(); in testBytes()
52 sink.assertInvariants(8); in testBytes()
53 sink.assertBytes(expected); in testBytes()
57 Sink sink = new Sink(4); in testShort() local
[all …]
/external/protobuf/php/ext/google/protobuf/
Dmessage.c83 upb_bytessink sink; member
89 stringsink *sink = _sink; in stringsink_start() local
90 sink->len = 0; in stringsink_start()
91 return sink; in stringsink_start()
96 stringsink *sink = _sink; in stringsink_string() local
97 size_t new_size = sink->size; in stringsink_string()
102 while (sink->len + len > new_size) { in stringsink_string()
106 if (new_size != sink->size) { in stringsink_string()
107 sink->ptr = realloc(sink->ptr, new_size); in stringsink_string()
108 sink->size = new_size; in stringsink_string()
[all …]
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/framed/
DSpdy3.java102 @Override public FrameWriter newWriter(BufferedSink sink, boolean client) { in newWriter() argument
103 return new Writer(sink, client); in newWriter()
288 private final BufferedSink sink; field in Spdy3.Writer
294 Writer(BufferedSink sink, boolean client) { in Writer() argument
295 this.sink = sink; in Writer()
320 sink.flush(); in flush()
333 sink.writeInt(0x80000000 | (VERSION & 0x7fff) << 16 | type & 0xffff); in synStream()
334 sink.writeInt((flags & 0xff) << 24 | length & 0xffffff); in synStream()
335 sink.writeInt(streamId & 0x7fffffff); in synStream()
336 sink.writeInt(associatedStreamId & 0x7fffffff); in synStream()
[all …]
/external/guava/guava-tests/test/com/google/common/io/
DCharSinkTest.java40 private TestCharSink sink; field in CharSinkTest
44 sink = new TestCharSink(); in setUp()
48 Writer writer = sink.openBufferedStream(); in testOpenBufferedStream()
49 assertTrue(sink.wasStreamOpened()); in testOpenBufferedStream()
50 assertFalse(sink.wasStreamClosed()); in testOpenBufferedStream()
55 assertTrue(sink.wasStreamClosed()); in testOpenBufferedStream()
56 assertEquals(STRING, sink.getString()); in testOpenBufferedStream()
60 assertEquals("", sink.getString()); in testWrite_string()
61 sink.write(STRING); in testWrite_string()
63 assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); in testWrite_string()
[all …]
DByteSinkTest.java39 private TestByteSink sink; field in ByteSinkTest
43 sink = new TestByteSink(); in setUp()
47 OutputStream out = sink.openBufferedStream(); in testOpenBufferedStream()
48 assertTrue(sink.wasStreamOpened()); in testOpenBufferedStream()
49 assertFalse(sink.wasStreamClosed()); in testOpenBufferedStream()
54 assertTrue(sink.wasStreamClosed()); in testOpenBufferedStream()
55 assertArrayEquals(new byte[] {1, 2, 3, 4}, sink.getBytes()); in testOpenBufferedStream()
59 assertArrayEquals(new byte[0], sink.getBytes()); in testWrite_bytes()
60 sink.write(bytes); in testWrite_bytes()
62 assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed()); in testWrite_bytes()
[all …]
/external/webrtc/webrtc/base/
Dsocket_unittest.cc193 testing::StreamSink sink; in ConnectInternal() local
199 sink.Monitor(client.get()); in ConnectInternal()
206 sink.Monitor(server.get()); in ConnectInternal()
212 EXPECT_FALSE(sink.Check(server.get(), testing::SSE_READ)); in ConnectInternal()
223 EXPECT_FALSE(sink.Check(client.get(), testing::SSE_OPEN)); in ConnectInternal()
224 EXPECT_FALSE(sink.Check(client.get(), testing::SSE_CLOSE)); in ConnectInternal()
227 EXPECT_TRUE_WAIT((sink.Check(server.get(), testing::SSE_READ)), kTimeout); in ConnectInternal()
240 EXPECT_TRUE(sink.Check(client.get(), testing::SSE_OPEN)); in ConnectInternal()
241 EXPECT_FALSE(sink.Check(client.get(), testing::SSE_CLOSE)); in ConnectInternal()
248 testing::StreamSink sink; in ConnectWithDnsLookupInternal() local
[all …]
/external/libbrillo/brillo/dbus/
Ddbus_signal_handler_unittest.cc50 void CallSignal(SignalHandlerSink* sink, Args... args) { in CallSignal() argument
59 base::Bind(&SignalHandlerSink::Handler, base::Unretained(sink)), in CallSignal()
84 } sink; in TEST_F() local
86 EXPECT_CALL(sink, Handler(10, 20, 30.5)).Times(1); in TEST_F()
87 CallSignal(&sink, 10, 20, 30.5); in TEST_F()
95 } sink; in TEST_F() local
97 EXPECT_CALL(sink, Handler(std::string{"foo"}, std::string{"bar"})).Times(1); in TEST_F()
98 CallSignal(&sink, std::string{"foo"}, std::string{"bar"}); in TEST_F()
105 } sink; in TEST_F() local
107 EXPECT_CALL(sink, Handler()).Times(1); in TEST_F()
[all …]
/external/clang/test/OpenMP/
Dordered_messages.cpp99 …#pragma omp ordered depend(sink : i) // expected-error {{'ordered' directive with 'depend' clause … in foo()
107 #pragma omp ordered depend(sink // expected-error {{expected expression}} expected-warning {{missin… in foo()
108 #pragma omp ordered depend(sink : // expected-error {{expected ')'}} expected-note {{to match this … in foo()
109 #pragma omp ordered depend(sink : i // expected-error {{expected ')'}} expected-note {{to match thi… in foo()
110 #pragma omp ordered depend(sink : i) // expected-error {{expected 'j' loop iteration variable}} in foo()
116 #pragma omp ordered depend(sink : i, j) // expected-error {{'#pragma omp ordered' with 'depend' cla… in foo()
122 #pragma omp ordered depend(sink : i, j) in foo()
123 #pragma omp ordered depend(sink : j, i) // expected-error {{expected 'i' loop iteration variable}} … in foo()
124 #pragma omp ordered depend(sink : i, j, k) // expected-error {{unexpected expression: number of exp… in foo()
125 #pragma omp ordered depend(sink : i+foo(), j/4) // expected-error {{expression is not an integral c… in foo()
[all …]
/external/okhttp/okio/okio/src/main/java/okio/
DSegment.java134 public void writeTo(Segment sink, int byteCount) { in writeTo() argument
135 if (!sink.owner) throw new IllegalArgumentException(); in writeTo()
136 if (sink.limit + byteCount > SIZE) { in writeTo()
138 if (sink.shared) throw new IllegalArgumentException(); in writeTo()
139 if (sink.limit + byteCount - sink.pos > SIZE) throw new IllegalArgumentException(); in writeTo()
140 System.arraycopy(sink.data, sink.pos, sink.data, 0, sink.limit - sink.pos); in writeTo()
141 sink.limit -= sink.pos; in writeTo()
142 sink.pos = 0; in writeTo()
145 System.arraycopy(data, pos, sink.data, sink.limit, byteCount); in writeTo()
146 sink.limit += byteCount; in writeTo()
DOkio.java55 public static BufferedSink buffer(Sink sink) { in buffer() argument
56 if (sink == null) throw new IllegalArgumentException("sink == null"); in buffer()
57 return new RealBufferedSink(sink); in buffer()
61 public static Sink sink(OutputStream out) { in sink() method in Okio
62 return sink(out, new Timeout()); in sink()
65 private static Sink sink(final OutputStream out, final Timeout timeout) { in sink() method in Okio
112 public static Sink sink(Socket socket) throws IOException {
115 Sink sink = sink(socket.getOutputStream(), timeout);
116 return timeout.sink(sink);
129 @Override public long read(Buffer sink, long byteCount) throws IOException {
[all …]
DDeflaterSink.java38 private final BufferedSink sink; field in DeflaterSink
42 public DeflaterSink(Sink sink, Deflater deflater) { in DeflaterSink() argument
43 this(Okio.buffer(sink), deflater); in DeflaterSink()
51 DeflaterSink(BufferedSink sink, Deflater deflater) { in DeflaterSink() argument
52 if (sink == null) throw new IllegalArgumentException("source == null"); in DeflaterSink()
54 this.sink = sink; in DeflaterSink()
86 Buffer buffer = sink.buffer(); in deflate()
101 sink.emitCompleteSegments(); in deflate()
115 sink.flush(); in flush()
142 sink.close(); in close()
[all …]
/external/protobuf/ruby/ext/google/protobuf_c/
Dencode_decode.c717 upb_sink sink; in Message_decode() local
721 upb_sink_reset(&sink, h, msg); in Message_decode()
722 decoder = upb_pbdecoder_create(&se.env, method, &sink); in Message_decode()
760 upb_sink sink; in Message_decode_json() local
764 upb_sink_reset(&sink, get_fill_handlers(desc), msg); in Message_decode_json()
765 parser = upb_json_parser_create(&se.env, method, &sink); in Message_decode_json()
788 upb_bytessink sink; member
794 stringsink *sink = _sink; in stringsink_start() local
795 sink->len = 0; in stringsink_start()
796 return sink; in stringsink_start()
[all …]
/external/okhttp/okhttp-ws/src/main/java/com/squareup/okhttp/internal/ws/
DWebSocketWriter.java51 private final BufferedSink sink; field in WebSocketWriter
63 public WebSocketWriter(boolean isClient, BufferedSink sink, Random random) { in WebSocketWriter() argument
64 if (sink == null) throw new NullPointerException("sink == null"); in WebSocketWriter()
67 this.sink = sink; in WebSocketWriter()
131 sink.writeByte(b0); in writeControlFrameSynchronized()
136 sink.writeByte(b1); in writeControlFrameSynchronized()
139 sink.write(maskKey); in writeControlFrameSynchronized()
145 sink.writeByte(b1); in writeControlFrameSynchronized()
148 sink.writeAll(payload); in writeControlFrameSynchronized()
152 sink.emit(); in writeControlFrameSynchronized()
[all …]
/external/okhttp/okhttp-ws-tests/src/test/java/com/squareup/okhttp/internal/ws/
DWebSocketWriterTest.java64 BufferedSink sink = Okio.buffer(serverWriter.newMessageSink(OPCODE_TEXT)); in serverTextMessage() local
66 sink.writeUtf8("Hel").flush(); in serverTextMessage()
69 sink.writeUtf8("lo").flush(); in serverTextMessage()
72 sink.close(); in serverTextMessage()
77 BufferedSink sink = Okio.buffer(serverWriter.newMessageSink(OPCODE_TEXT)); in closeFlushes() local
79 sink.writeUtf8("Hel").flush(); in closeFlushes()
82 sink.writeUtf8("lo").close(); in closeFlushes()
87 Sink sink = serverWriter.newMessageSink(OPCODE_TEXT); in noWritesAfterClose() local
89 sink.close(); in noWritesAfterClose()
95 sink.write(payload, payload.size()); in noWritesAfterClose()
[all …]
/external/swiftshader/src/OpenGL/compiler/
DInfoSink.cpp22 sink.append("WARNING: "); in prefix()
25 sink.append("ERROR: "); in prefix()
28 sink.append("INTERNAL ERROR: "); in prefix()
31 sink.append("UNIMPLEMENTED: "); in prefix()
34 sink.append("NOTE: "); in prefix()
37 sink.append("UNKOWN ERROR: "); in prefix()
52 sink.append(stream.str()); in location()
57 sink.append(s); in message()
58 sink.append("\n"); in message()
64 sink.append(s); in message()
[all …]
DInfoSink.h54 sink.append(stream.str());
60 sink.append(1, c);
64 sink.append(str);
68 sink.append(str);
72 sink.append(str.c_str());
91 sink.append(stream.str());
97 sink.append(str);
101 void erase() { sink.clear(); } in erase()
102 int size() { return static_cast<int>(sink.size()); } in size()
104 const TPersistString& str() const { return sink; } in str()
[all …]
/external/icu/icu4c/source/common/
Ducasemap.cpp141 ByteSink &sink, uint32_t options, icu::Edits *edits, UErrorCode &errorCode) { in appendResult() argument
151 ByteSinkUtil::appendCodePoint(cpLength, ~result, sink); in appendResult()
156 return ByteSinkUtil::appendChange(cpLength, s, result, sink, edits, errorCode); in appendResult()
158 ByteSinkUtil::appendCodePoint(cpLength, result, sink, edits); in appendResult()
210 icu::ByteSink &sink, icu::Edits *edits, in _caseMap() argument
223 sink, options, edits, errorCode); in _caseMap()
227 appendResult(srcIndex - cpStart, c, s, sink, options, edits, errorCode); in _caseMap()
238 ByteSink &sink, icu::Edits *edits, in ucasemap_internalUTF8ToTitle() argument
293 sink, options, edits, errorCode)) { in ucasemap_internalUTF8ToTitle()
306 … if (!appendResult(titleLimit-titleStart, c, s, sink, options, edits, errorCode)) { in ucasemap_internalUTF8ToTitle()
[all …]
/external/skqp/src/views/
DSkEventSink.cpp48 SkEventSink* sink = globals.fSinkHead; in ~SkEventSink() local
52 SkEventSink* next = sink->fNextSink; in ~SkEventSink()
53 if (sink == this) { in ~SkEventSink()
61 prev = sink; in ~SkEventSink()
62 sink = next; in ~SkEventSink()
93 SkEventSink* sink = globals.fSinkHead; in FindSink() local
95 while (sink) in FindSink()
97 if (sink->getSinkID() == sinkID) in FindSink()
98 return sink; in FindSink()
99 sink = sink->fNextSink; in FindSink()
/external/skia/src/views/
DSkEventSink.cpp48 SkEventSink* sink = globals.fSinkHead; in ~SkEventSink() local
52 SkEventSink* next = sink->fNextSink; in ~SkEventSink()
53 if (sink == this) { in ~SkEventSink()
61 prev = sink; in ~SkEventSink()
62 sink = next; in ~SkEventSink()
93 SkEventSink* sink = globals.fSinkHead; in FindSink() local
95 while (sink) in FindSink()
97 if (sink->getSinkID() == sinkID) in FindSink()
98 return sink; in FindSink()
99 sink = sink->fNextSink; in FindSink()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/
DHttp1xStream.java73 private final BufferedSink sink; field in Http1xStream
77 public Http1xStream(StreamAllocation streamAllocation, BufferedSource source, BufferedSink sink) { in Http1xStream() argument
80 this.sink = sink; in Http1xStream()
161 sink.flush(); in finishRequest()
167 sink.writeUtf8(requestLine).writeUtf8("\r\n"); in writeRequest()
169 sink.writeUtf8(headers.name(i)) in writeRequest()
174 sink.writeUtf8("\r\n"); in writeRequest()
232 requestBody.writeToSocket(sink); in writeRequestBody()
269 private final ForwardingTimeout timeout = new ForwardingTimeout(sink.timeout());
288 sink.write(source, byteCount); in write()
[all …]

12345678910>>...22