Home
last modified time | relevance | path

Searched refs:allocate (Results 1 – 25 of 98) sorted by relevance

1234

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineTest.java326 … ByteBuffer bbd = ByteBuffer.allocate(clientEngine.engine.getSession().getApplicationBufferSize()); in test_unwrap_01()
342 …ByteBuffer[] bbA = { ByteBuffer.allocate(100), ByteBuffer.allocate(10), ByteBuffer.allocate(100) }; in test_unwrap_02()
344 ByteBuffer bb = ByteBuffer.allocate(10); in test_unwrap_02()
378 ByteBuffer bbR = ByteBuffer.allocate(100).asReadOnlyBuffer(); in test_unwrap_03()
379 ByteBuffer[] bbA = { bbR, ByteBuffer.allocate(10), ByteBuffer.allocate(100) }; in test_unwrap_03()
381 ByteBuffer bb = ByteBuffer.allocate(10); in test_unwrap_03()
400 … ByteBuffer[] bbA = {ByteBuffer.allocate(100), ByteBuffer.allocate(10), ByteBuffer.allocate(100)}; in test_unwrap_04()
401 ByteBuffer[] bbAN = {ByteBuffer.allocate(100), null, ByteBuffer.allocate(100)}; in test_unwrap_04()
403 ByteBuffer bb = ByteBuffer.allocate(10); in test_unwrap_04()
438 …ByteBuffer[] bbA = { ByteBuffer.allocate(100), ByteBuffer.allocate(10), ByteBuffer.allocate(100) }; in test_unwrap_05()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DASCIICharsetEncoderTest.java85 ByteBuffer out = ByteBuffer.allocate(10); in testMultiStepEncode()
91 out = ByteBuffer.allocate(10); in testMultiStepEncode()
127 ByteBuffer bb = ByteBuffer.allocate(0x10); in testEncodeMapping()
140 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState()
162 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset()
170 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset()
177 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset()
189 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Encoding()
196 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Encoding()
204 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Encoding()
[all …]
DCharsetDecoderTest.java214 CharBuffer out = decoder.decode(ByteBuffer.allocate(0)); in implTestDecodeByteBuffer()
309 CharBuffer out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer()
363 out = CharBuffer.allocate(4); in implTestDecodeByteBufferCharBuffer()
370 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer()
374 out = CharBuffer.allocate(100); in implTestDecodeByteBufferCharBuffer()
409 CharBuffer out = CharBuffer.allocate(50); in implTestDecodeCharBufferByteBufferUnmappedException()
463 CharBuffer out = CharBuffer.allocate(getString().length() * 3); in implTestDecodeCharBufferByteBufferMalformedException()
512 CharBuffer out = CharBuffer.allocate(50); in implTestDecodeCharBufferByteBufferException()
572 CharBuffer out = CharBuffer.allocate(10); in testFlush()
581 .flush(CharBuffer.allocate(10))); in testFlush()
[all …]
DCharsetEncoderTest.java275 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), false); in testResetIllegalState()
277 encoder.encode(CharBuffer.wrap("aaa"), ByteBuffer.allocate(3), true); in testResetIllegalState()
283 ByteBuffer out = ByteBuffer.allocate(5); in testFlushIllegalState()
313 ByteBuffer out = ByteBuffer.allocate(5); in testFlushAfterConstructing()
350 ByteBuffer.allocate(30), true); in testEncodeFacadeIllegalState()
357 ByteBuffer.allocate(30), false); in testEncodeFacadeIllegalState()
364 ByteBuffer.allocate(30), true); in testEncodeFacadeIllegalState()
365 encoder.flush(ByteBuffer.allocate(10)); in testEncodeFacadeIllegalState()
373 ByteBuffer out = ByteBuffer.allocate(5); in testEncodeTrueIllegalState()
385 ByteBuffer.allocate(30), true); in testEncodeTrueIllegalState()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DSourceChannelTest.java68 sink.write(ByteBuffer.allocate(1)); in test_read_LByteBuffer_DataAvailable()
69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable()
90 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_LByteBuffer_SinkClosed()
108 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_LByteBuffer_SourceClosed()
172 ByteBuffer[] readBufArray = { ByteBuffer.allocate(BUFFER_SIZE), in test_read_$LByteBuffer()
173 ByteBuffer.allocate(BUFFER_SIZE) }; in test_read_$LByteBuffer()
236 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_$LByteBuffer_SinkClosed()
256 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_$LByteBuffer_SourceClosed()
315 ByteBuffer[] readBufArray = { ByteBuffer.allocate(BUFFER_SIZE), in test_read_$LByteBufferII()
316 ByteBuffer.allocate(BUFFER_SIZE) }; in test_read_$LByteBufferII()
[all …]
DFileChannelTest.java234 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadOnly()
293 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadWrite()
394 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_positionJ_ReadOnly()
464 ByteBuffer buf = ByteBuffer.allocate(8); in test_size()
466 ByteBuffer[] bufs = { ByteBuffer.allocate(8) }; in test_size()
1195 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBuffer_Closed()
1232 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBuffer_WriteOnly()
1250 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBuffer_EmptyFile()
1262 ByteBuffer readBuffer = ByteBuffer.allocate(LIMITED_CAPACITY); in test_readLByteBuffer_LimitedCapacity()
1275 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_AS_BYTES_LENGTH); in test_readLByteBuffer()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/
DBufferTest.java67 testByteSwappedBulkGet(ByteBuffer.allocate(10)); in testByteSwappedBulkGetHeap()
160 testByteSwappedBulkPut(ByteBuffer.allocate(10)); in testByteSwappedBulkPutHeap()
213 testByteBufferByteOrder(ByteBuffer.allocate(10), false); in testByteBufferByteOrderHeapRW()
225 testByteBufferByteOrder(ByteBuffer.allocate(10), true); in testByteBufferByteOrderHeapRO()
290 return ByteBuffer.allocate(10).order(order).asCharBuffer(); in allocateCharBuffer()
294 testCharBufferByteOrder(CharBuffer.allocate(10), ByteOrder.nativeOrder()); in testCharBufferByteOrderArray()
321 return ByteBuffer.allocate(10*8).order(order).asDoubleBuffer(); in allocateDoubleBuffer()
325 testDoubleBufferByteOrder(DoubleBuffer.allocate(10), ByteOrder.nativeOrder()); in testDoubleBufferByteOrderArray()
352 return ByteBuffer.allocate(10*8).order(order).asFloatBuffer(); in allocateFloatBuffer()
356 testFloatBufferByteOrder(FloatBuffer.allocate(10), ByteOrder.nativeOrder()); in testFloatBufferByteOrderArray()
[all …]
DCharBufferTest.java30 CharBuffer cb = CharBuffer.allocate(32).append(s); in testChars()
41 CharBuffer cb = CharBuffer.allocate(32).append(s); in testCodePoints()
51 cb = CharBuffer.allocate(32).append(surrogateCP); in testCodePoints()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/
DHeapDoubleBufferTest.java23 buf = DoubleBuffer.allocate(BUFFER_LENGTH); in setUp()
36 DoubleBuffer.allocate(-1); in testAllocatedDoubleBuffer_IllegalArg()
DHeapFloatBufferTest.java23 buf = FloatBuffer.allocate(BUFFER_LENGTH); in setUp()
36 FloatBuffer.allocate(-1); in testAllocatedFloatBuffer_IllegalArg()
DHeapCharBufferTest.java25 buf = CharBuffer.allocate(BUFFER_LENGTH); in setUp()
38 CharBuffer.allocate(-1); in testAllocatedCharBuffer_IllegalArg()
DHeapIntBufferTest.java23 buf = IntBuffer.allocate(BUFFER_LENGTH); in setUp()
36 IntBuffer.allocate(-1); in testAllocatedIntBuffer_IllegalArg()
DHeapLongBufferTest.java23 buf = LongBuffer.allocate(BUFFER_LENGTH); in setUp()
36 LongBuffer.allocate(-1); in testAllocatedLongBuffer_IllegalArg()
DHeapShortBufferTest.java23 buf = ShortBuffer.allocate(BUFFER_LENGTH); in setUp()
36 ShortBuffer.allocate(-1); in testAllocatedShortBuffer_IllegalArg()
DHeapByteBufferTest.java26 buf = ByteBuffer.allocate(BUFFER_LENGTH); in setUp()
42 ByteBuffer.allocate(-1); in testAllocatedByteBuffer_IllegalArg()
DReadOnlyHeapIntBufferTest.java23 buf = IntBuffer.allocate(BUFFER_LENGTH); in setUp()
DReadOnlyHeapShortBufferTest.java23 buf = ShortBuffer.allocate(BUFFER_LENGTH); in setUp()
DReadOnlyHeapFloatBufferTest.java23 buf = FloatBuffer.allocate(BUFFER_LENGTH); in setUp()
DReadOnlyHeapCharBufferTest.java26 buf = CharBuffer.allocate(BUFFER_LENGTH); in setUp()
DReadOnlyHeapLongBufferTest.java23 buf = LongBuffer.allocate(BUFFER_LENGTH); in setUp()
DReadOnlyHeapDoubleBufferTest.java24 buf = DoubleBuffer.allocate(BUFFER_LENGTH); in setUp()
/libcore/luni/src/test/java/libcore/java/nio/charset/
DCharsetEncoderTest.java71 ByteBuffer bb = ByteBuffer.allocate(128); in testSurrogatePairAllAtOnce()
85 ByteBuffer bb = ByteBuffer.allocate(128); in testMalformedSurrogatePair()
122 ByteBuffer bb = ByteBuffer.allocate(128); in testCharsetEncoderSplitSurrogates()
146 ByteBuffer bb = ByteBuffer.allocate(128); in testFlushWithoutEndOfInput()
206 ByteBuffer bb = ByteBuffer.allocate(4);
207 CoderResult cr = e.encode(CharBuffer.allocate(0), bb, true);
223 ByteBuffer output = ByteBuffer.allocate(10);
DCharsetDecoderTest.java44 CharBuffer outBuffer = CharBuffer.allocate(arr.length); in test_ByteArray_decode_no_offset()
60 CharBuffer outBuffer = CharBuffer.allocate(arr.length - offset); in test_ByteArray_decode_with_offset()
97 CharBuffer cb = CharBuffer.allocate(128); in testUtf8BytesSplitAcrossMultipleWrites()
115 CharBuffer cb = CharBuffer.allocate(128); in testBufferWithNonZeroOffset()
/libcore/luni/src/test/java/libcore/java/nio/channels/
DOldFileChannelTest.java260 ByteBuffer readBuffer = ByteBuffer.allocate(CAPACITY); in test_readLByteBufferJ_IllegalArgument()
545 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_IndexOutOfBound()
546 readBuffers[1] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_IndexOutOfBound()
610 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyFile()
611 readBuffers[1] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyFile()
620 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyBuffers()
629 readBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_read$LByteBufferII_EmptyBuffers()
653 ByteBuffer writeBuffer = ByteBuffer.allocate(CAPACITY); in test_writeLByteBuffer_Closed()
713 ByteBuffer writeBuffer = ByteBuffer.allocate(CAPACITY); in test_writeLByteBufferJ_IllegalArgument()
784 writeBuffers[0] = ByteBuffer.allocate(CAPACITY); in test_write$LByteBuffer_Closed()
[all …]
/libcore/support/src/test/java/libcore/javax/net/ssl/
DTestSSLEnginePair.java89 ByteBuffer clientToServer = ByteBuffer.allocate(packetBufferSize); in connect()
90 ByteBuffer serverToClient = ByteBuffer.allocate(packetBufferSize); in connect()
93 ByteBuffer scratch = ByteBuffer.allocate(applicationBufferSize); in connect()
203 ByteBuffer emptyByteBuffer = ByteBuffer.allocate(0); in handshakeCompleted()

1234