Home
last modified time | relevance | path

Searched refs:array (Results 1 – 25 of 74) sorted by relevance

123

/thrift-3.4.0/lib/java/src/main/java/org/apache/thrift/transport/
DAutoExpandingBuffer.java30 private byte[] array; field in AutoExpandingBuffer
33 this.array = new byte[initialCapacity]; in AutoExpandingBuffer()
37 final int currentCapacity = this.array.length; in resizeIfNecessary()
42 this.array = Arrays.copyOf(array, newCapacity); in resizeIfNecessary()
46 public byte[] array() { in array() method in AutoExpandingBuffer
47 return this.array; in array()
DAutoExpandingBufferReadTransport.java39 inTrans.readAll(buf.array(), 0, length); in fill()
59 System.arraycopy(buf.array(), pos, target, off, amtToRead); in read()
77 return buf.array(); in getBuffer()
DAutoExpandingBufferWriteTransport.java75 System.arraycopy(toWrite, off, buf.array(), pos, len); in write()
/thrift-3.4.0/lib/java/src/main/java/org/apache/thrift/partial/
DValidate.java75 public static <T> void checkNotNullAndNotEmpty(T[] array, String argName) { in checkNotNullAndNotEmpty() argument
76 Validate.checkNotNull(array, argName); in checkNotNullAndNotEmpty()
77 checkNotEmpty(array.length, argName); in checkNotNullAndNotEmpty()
81 public static void checkNotNullAndNotEmpty(byte[] array, String argName) { in checkNotNullAndNotEmpty() argument
82 Validate.checkNotNull(array, argName); in checkNotNullAndNotEmpty()
83 checkNotEmpty(array.length, argName); in checkNotNullAndNotEmpty()
87 public static void checkNotNullAndNotEmpty(short[] array, String argName) { in checkNotNullAndNotEmpty() argument
88 Validate.checkNotNull(array, argName); in checkNotNullAndNotEmpty()
89 checkNotEmpty(array.length, argName); in checkNotNullAndNotEmpty()
93 public static void checkNotNullAndNotEmpty(int[] array, String argName) { in checkNotNullAndNotEmpty() argument
[all …]
/thrift-3.4.0/lib/java/src/test/java/org/apache/thrift/transport/
DTestAutoExpandingBufferWriteTransport.java37 assertEquals(1, t.getBuf().array().length); in testIt()
41 assertTrue(t.getBuf().array().length >= 3); in testIt()
42 assertEquals(ByteBuffer.wrap(b1), ByteBuffer.wrap(t.getBuf().array(), 0, 3)); in testIt()
46 assertTrue(t.getBuf().array().length >= 3); in testIt()
50 assertEquals(ByteBuffer.wrap(b2), ByteBuffer.wrap(t.getBuf().array(), 0, 2)); in testIt()
54 assertEquals(8, uut.getBuf().array().length); in testIt()
57 assertEquals(8, uut.getBuf().array().length); in testIt()
58 assertEquals(ByteBuffer.wrap(b1), ByteBuffer.wrap(uut.getBuf().array(), 4, 3)); in testIt()
DTestAutoExpandingBuffer.java31 assertEquals(10, b.array().length); in testExpands()
35 assertEquals(10, b.array().length); in testExpands()
39 assertTrue(b.array().length >= 100); in testExpands()
/thrift-3.4.0/lib/nodejs/lib/thrift/
Djson_parse.js199 array = function () {
203 var array = [];
210 return array; // empty array
213 array.push(value());
217 return array;
270 return array();
/thrift-3.4.0/lib/java/src/main/java/org/apache/thrift/transport/sasl/
DFixedSizeHeaderReader.java47 + StringUtils.bytesToHexString(byteBuffer.array(), 0, byteBuffer.position())); in toBytes()
49 return byteBuffer.array(); in toBytes()
DFrameReader.java107 return payload.array(); in getPayload()
144 byte[] bytes = recipient.array(); in readAvailable()
/thrift-3.4.0/lib/java/src/main/java/org/apache/thrift/
DTBaseHelper.java212 byte[] buf = bb.array(); in toString()
237 return byteBuffer.array(); in byteBufferToByteArray()
254 byteBuffer.array(), in byteBufferToByteArray()
279 orig.array(), orig.arrayOffset() + orig.position(), copy.array(), 0, orig.remaining()); in copyBinary()
281 orig.slice().get(copy.array()); in copyBinary()
/thrift-3.4.0/lib/java/src/test/java/org/apache/thrift/transport/sasl/
DTestDataFrameReader.java52 transport.reset(buffer.array(), 0, 6); in testRead()
61 transport.reset(buffer.array(), 6, 21); in testRead()
DTestSaslNegotiationFrameReader.java46 transport.reset(buffer.array()); in testRead()
/thrift-3.4.0/lib/java/src/test/java/org/apache/thrift/
DTestUnsafeBinaries.java86 val.array()[0] = 2; in testUnsafeBufferFor()
122 val.array()[0] = 2; in testSafeBufferFor()
DTestTBaseHelper.java175 byte[] array = new byte[] {1, 2, 3}; in testByteBufferToString()
176 ByteBuffer bb = ByteBuffer.wrap(array, 1, 2); in testByteBufferToString()
180 bb = ByteBuffer.wrap(array, 0, array.length); in testByteBufferToString()
DTestTUnion.java241 assertNotSame(cu.bufferForBinary_field().array(), copy.bufferForBinary_field().array()); in testDeepCopy()
/thrift-3.4.0/lib/erl/src/
Dthrift_json_protocol.erl82 start_context(array) -> "[".
85 end_context(array) -> "]".
138 {array, N, _, _} when N > 0 -> % array element (not first)
174 {enter_context, array},
209 {enter_context, array},
226 {enter_context, array},
241 {enter_context, array},
Dthrift_json_parser.erl123 array(Rest, handle_event(start_array, Handler, Config), [array|Stack], Config);
140 array(<<?end_array, Rest/binary>>, Handler, [array|Stack], Config) -> function
142 array(<<S, Rest/binary>>, Handler, Stack, Config) when ?is_whitespace(S) -> function
143 array(Rest, Handler, Stack, Config);
144 array(Bin, Handler, Stack, Config) -> function
/thrift-3.4.0/lib/java/src/main/java/org/apache/thrift/server/
DAbstractNonblockingServer.java440 readBufferBytesAllocated.addAndGet(-buffer_.array().length); in close()
464 readBufferBytesAllocated.addAndGet(-buffer_.array().length); in responseReady()
485 frameTrans_.reset(buffer_.array()); in invoke()
560 frameTrans_.reset(buffer_.array()); in invoke()
/thrift-3.4.0/lib/d/test/
Dclient_pool_test.d25 import std.array;
170 immutable ports = cast(immutable)array(map!"cast(ushort)a"(iota(port, port + 6))); in main()
185 auto handlers = array(map!((args){ in main()
217 auto clients = array(map!((a){ in syncClientPoolTest()
352 auto result = makeAsyncFastestPool(array(retro(clients))).getPort().waitGet(); in asyncFastestClientPoolTest()
/thrift-3.4.0/lib/cpp/test/
DTMemoryBufferTest.cpp142 std::array<uint8_t, N> x; in BOOST_AUTO_TEST_CASE()
147 static const std::array<uint8_t, N> buf_mem = filler(); in BOOST_AUTO_TEST_CASE()
215 std::array<uint8_t, N> x; in BOOST_AUTO_TEST_CASE()
220 static const std::array<uint8_t, N> buf_mem = filler(); in BOOST_AUTO_TEST_CASE()
/thrift-3.4.0/lib/d/src/thrift/internal/
Dresource_pool.d23 import std.array : array, empty;
199 res = array(randomCover(res, rndGen)); in TResourcePool()
/thrift-3.4.0/lib/d/src/thrift/
Dbase.d121 import std.array : Appender;
/thrift-3.4.0/lib/d/src/thrift/transport/
Drange.d25 import std.array : empty;
Dpiped.d188 import std.array; in version()
/thrift-3.4.0/lib/java/src/main/java/org/apache/thrift/transport/layered/
DTFastFramedTransport.java180 byte[] data = writeBuffer.getBuf().array(); in flush()

123