Home
last modified time | relevance | path

Searched refs:ByteBuffer (Results 1 – 25 of 375) sorted by relevance

12345678910>>...15

/external/apache-harmony/x-net/src/test/api/java/org/apache/harmony/xnet/tests/javax/net/ssl/
DSSLEngineTest.java20 import java.nio.ByteBuffer;
95 ByteBuffer bbN = null; in testWrap01()
96 ByteBuffer bb = ByteBuffer.allocate(10); in testWrap01()
102 ByteBuffer roBb = bb.asReadOnlyBuffer(); in testWrap01()
123 ByteBuffer[] bbNA = null; in testWrap02()
124 ByteBuffer[] bbA = { null, ByteBuffer.allocate(10), null }; in testWrap02()
126 ByteBuffer bb = ByteBuffer.allocate(10); in testWrap02()
127 ByteBuffer bbN = null; in testWrap02()
138 ByteBuffer roBb = bb.asReadOnlyBuffer(); in testWrap02()
139 bbA[0] = ByteBuffer.allocate(100); in testWrap02()
[all …]
/external/apache-harmony/nio_char/src/test/java/org/apache/harmony/nio_char/tests/java/nio/charset/
DASCIICharsetEncoderTest.java19 import java.nio.ByteBuffer;
85 ByteBuffer out = ByteBuffer.allocate(10); in testMultiStepEncode()
90 out = ByteBuffer.allocate(10); in testMultiStepEncode()
103 ByteBuffer bb = encoder.encode(cb); in testEncodeMapping()
121 ByteBuffer bb = ByteBuffer.allocate(0x10); in testEncodeMapping()
134 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState()
156 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset()
164 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset()
171 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Reset()
183 ByteBuffer out = ByteBuffer.allocate(0x10); in testInternalState_Encoding()
[all …]
DCharsetDecoderTest.java21 import java.nio.ByteBuffer;
61 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
94 ByteBuffer in = ByteBuffer.wrap(new byte[] { 109, 97, 109 }); in test_decode()
112 ByteBuffer.wrap(new byte[] { 0x00, 0x11 })); in test_decodeLjava_nio_ByteBuffer()
121 cs2.decode(ByteBuffer.wrap(new byte[] { 0x00, 0x11 })); in test_decodeLjava_nio_ByteBuffer()
159 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
173 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop()
191 ByteBuffer in = ByteBuffer.wrap(new byte[] { 0x45, 0x38, 0x45, 0x45 }); in testDecodeLjava_nio_ByteBuffer_ReplaceOverflow()
219 protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { in decodeLoop()
258 decoder.decode(ByteBuffer.wrap(bytes)); in testInvalidDecoding()
[all …]
/external/apache-harmony/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/
DSourceChannelTest.java20 import java.nio.ByteBuffer;
42 private ByteBuffer buffer;
44 private ByteBuffer positionedBuffer;
51 buffer = ByteBuffer.wrap("bytes".getBytes(ISO8859_1)); in setUp()
52 positionedBuffer = ByteBuffer.wrap("12345bytes".getBytes(ISO8859_1)); in setUp()
68 sink.write(ByteBuffer.allocate(1)); in test_read_LByteBuffer_DataAvailable()
69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable()
77 ByteBuffer nullBuf = null; in test_read_LByteBuffer_Exception()
90 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_LByteBuffer_SinkClosed()
108 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_read_LByteBuffer_SourceClosed()
[all …]
DDatagramChannelTest.java27 import java.nio.ByteBuffer;
159 ByteBuffer[] readBuf = null; in testReadByteBufferArray()
172 readBuf = new ByteBuffer[bufSize]; in testReadByteBufferArray()
193 ByteBuffer[] readBuf = null; in testReadByteBufferArray_BufNull()
222 ByteBuffer[] readBuf = null; in testWriteByteBuffer()
235 readBuf = new ByteBuffer[bufSize]; in testWriteByteBuffer()
257 ByteBuffer[] readBuf = null; in testWriteByteBuffer_Bufnull()
431 ByteBuffer buf = ByteBuffer.allocate(CAPACITY_1KB); in testConfigureBlocking_Read()
765 ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL) in testReceive_UnconnectedReadonly()
784 ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL); in testReceive_UnconnectedBufEmpty()
[all …]
DSinkChannelTest.java22 import java.nio.ByteBuffer;
46 private ByteBuffer buffer;
48 private ByteBuffer positionedBuffer;
55 buffer = ByteBuffer.wrap("bytes".getBytes(ISO8859_1)); in setUp()
56 positionedBuffer = ByteBuffer.wrap("12345bytes".getBytes(ISO8859_1)); in setUp()
71 ByteBuffer[] bufArray = { buffer, positionedBuffer }; in test_write_LByteBuffer()
82 for (ByteBuffer buf : bufArray) { in test_write_LByteBuffer()
86 ByteBuffer readBuf = ByteBuffer.allocate(BUFFER_SIZE); in test_write_LByteBuffer()
114 sink.write(ByteBuffer.wrap(strbytes)); in test_write_LByteBuffer_mutliThread()
127 ByteBuffer readBuf = ByteBuffer.allocate(THREAD_NUM * BUFFER_SIZE); in test_write_LByteBuffer_mutliThread()
[all …]
DFileChannelTest.java29 import java.nio.ByteBuffer;
234 ByteBuffer writeBuffer = ByteBuffer.wrap(CONTENT_AS_BYTES); in test_forceJ()
287 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadOnly()
334 ByteBuffer writeBuffer = ByteBuffer.wrap(CONTENT_AS_BYTES); in test_position_WriteOnly()
346 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_position_ReadWrite()
350 ByteBuffer writeBuffer = ByteBuffer.wrap(CONTENT_AS_BYTES); in test_position_ReadWrite()
447 ByteBuffer readBuffer = ByteBuffer.allocate(CONTENT_LENGTH); in test_positionJ_ReadOnly()
467 ByteBuffer writeBuffer = ByteBuffer.wrap(CONTENT_AS_BYTES); in test_positionJ_WriteOnly()
517 ByteBuffer buf = ByteBuffer.allocate(8); in test_size()
519 ByteBuffer[] bufs = { ByteBuffer.allocate(8) }; in test_size()
[all …]
DSocketChannelTest.java32 import java.nio.ByteBuffer;
130 java.nio.ByteBuffer[] buf = new java.nio.ByteBuffer[1]; in testOpen()
131 buf[0] = java.nio.ByteBuffer.allocateDirect(CAPACITY_NORMAL); in testOpen()
165 java.nio.ByteBuffer[] byteBuf = null; in testReadByteBufferArray()
178 byteBuf = new java.nio.ByteBuffer[CAPACITY_NORMAL]; in testReadByteBufferArray()
200 java.nio.ByteBuffer[] byteBuf = null; in testReadByteBufferArray_BufNull()
228 java.nio.ByteBuffer[] byteBuf = null; in testWriteByteBufferArray()
238 byteBuf = new java.nio.ByteBuffer[CAPACITY_NORMAL]; in testWriteByteBufferArray()
253 java.nio.ByteBuffer[] byteBuf = null; in testWriteByteBufferArray_BufNull()
1519 java.nio.ByteBuffer writeBuf = java.nio.ByteBuffer in testCFII_Data_ConnectWithServer()
[all …]
/external/chromium/third_party/libjingle/source/talk/base/
Dbytebuffer.cc41 ByteBuffer::ByteBuffer() { in ByteBuffer() function in talk_base::ByteBuffer
48 ByteBuffer::ByteBuffer(const char* bytes, size_t len) { in ByteBuffer() function in talk_base::ByteBuffer
56 ByteBuffer::ByteBuffer(const char* bytes) { in ByteBuffer() function in talk_base::ByteBuffer
64 ByteBuffer::~ByteBuffer() { in ~ByteBuffer()
68 bool ByteBuffer::ReadUInt8(uint8* val) { in ReadUInt8()
74 bool ByteBuffer::ReadUInt16(uint16* val) { in ReadUInt16()
86 bool ByteBuffer::ReadUInt24(uint32* val) { in ReadUInt24()
98 bool ByteBuffer::ReadUInt32(uint32* val) { in ReadUInt32()
110 bool ByteBuffer::ReadUInt64(uint64* val) { in ReadUInt64()
122 bool ByteBuffer::ReadString(std::string* val, size_t len) { in ReadString()
[all …]
/external/apache-harmony/nio_char/src/test/java/tests/api/java/nio/charset/
DUTF16CharsetDecoderTest.java20 import java.nio.ByteBuffer;
47 protected ByteBuffer getByteBuffer() { in getByteBuffer()
58 return ByteBuffer.wrap(b); in getByteBuffer()
61 protected ByteBuffer getHeadlessByteBuffer() { in getHeadlessByteBuffer()
62 ByteBuffer b = getByteBuffer(); in getHeadlessByteBuffer()
66 return ByteBuffer.wrap(bytes); in getHeadlessByteBuffer()
75 ByteBuffer.wrap(new byte[] { -1, -2, 32, 0, 98 }), out, in testMultiStepDecode()
81 assertSame(CoderResult.UNDERFLOW, decoder.decode(ByteBuffer in testMultiStepDecode()
83 assertTrue(decoder.decode(ByteBuffer.wrap(new byte[] { 98 }), out, in testMultiStepDecode()
89 assertSame(CoderResult.UNDERFLOW, decoder.decode(ByteBuffer in testMultiStepDecode()
[all …]
DUTFCharsetDecoderTest.java20 import java.nio.ByteBuffer;
48 ByteBuffer getUnmappedByteBuffer() throws UnsupportedEncodingException { in getUnmappedByteBuffer()
52 ByteBuffer getMalformedByteBuffer() throws UnsupportedEncodingException { in getMalformedByteBuffer()
53 ByteBuffer buffer = ByteBuffer.allocate(getByteBuffer().remaining() + 1); in getMalformedByteBuffer()
60 ByteBuffer getExceptionByteArray() throws UnsupportedEncodingException { in getExceptionByteArray()
68 protected ByteBuffer getByteBuffer() { in getByteBuffer()
69 return ByteBuffer.wrap(new byte[] { 32, 98, 117, 102, 102, 101, 114, in getByteBuffer()
/external/mp4parser/isoparser/src/main/java/com/coremedia/iso/
DIsoTypeReader.java19 import java.nio.ByteBuffer;
24 public static long readUInt32BE(ByteBuffer bb) { in readUInt32BE()
34 public static long readUInt32(ByteBuffer bb) { in readUInt32()
42 public static int readUInt24(ByteBuffer bb) { in readUInt24()
50 public static int readUInt16(ByteBuffer bb) { in readUInt16()
57 public static int readUInt16BE(ByteBuffer bb) { in readUInt16BE()
64 public static int readUInt8(ByteBuffer bb) { in readUInt8()
80 public static String readString(ByteBuffer byteBuffer) { in readString()
90 public static String readString(ByteBuffer byteBuffer, int length) { in readString()
97 public static long readUInt64(ByteBuffer byteBuffer) { in readUInt64()
[all …]
DIsoTypeWriter.java18 import java.nio.ByteBuffer;
22 public static void writeUInt64(ByteBuffer bb, long u) { in writeUInt64()
26 public static void writeUInt32(ByteBuffer bb, long u) { in writeUInt32()
31 public static void writeUInt32BE(ByteBuffer bb, long u) { in writeUInt32BE()
39 public static void writeUInt24(ByteBuffer bb, int i) { in writeUInt24()
47 public static void writeUInt16(ByteBuffer bb, int i) { in writeUInt16()
53 public static void writeUInt16BE(ByteBuffer bb, int i) { in writeUInt16BE()
59 public static void writeUInt8(ByteBuffer bb, int i) { in writeUInt8()
65 public static void writeFixedPont1616(ByteBuffer bb, double v) { in writeFixedPont1616()
73 public static void writeFixedPont88(ByteBuffer bb, double v) { in writeFixedPont88()
[all …]
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/boxes/piff/
DPlayReadyHeader.java12 import java.nio.ByteBuffer;
48 public void parse(ByteBuffer byteBuffer) { in parse()
65 public ByteBuffer getData() { in getData()
72 ByteBuffer byteBuffer = ByteBuffer.allocate(size); in getData()
79 ByteBuffer tmp4debug = record.getValue(); in getData()
113 public static List<PlayReadyRecord> createFor(ByteBuffer byteBuffer, int recordCount) { in createFor()
133 record.parse((ByteBuffer) byteBuffer.slice().limit(length)); in createFor()
141 public abstract void parse(ByteBuffer bytes); in parse()
154 public abstract ByteBuffer getValue(); in getValue()
164 public void parse(ByteBuffer bytes) { in parse()
[all …]
/external/jmonkeyengine/engine/src/networking/com/jme3/network/kernel/tcp/
DNioEndpoint.java39 import java.nio.ByteBuffer;
54 protected static final ByteBuffer CLOSE_MARKER = ByteBuffer.allocate(0);
59 private ConcurrentLinkedQueue<ByteBuffer> outbound = new ConcurrentLinkedQueue<ByteBuffer>();
121 protected void send( ByteBuffer data, boolean copy, boolean wakeup ) in send()
126 ByteBuffer buffer; in send()
131 buffer = ByteBuffer.allocate(data.remaining()); in send()
147 protected ByteBuffer peekPending() in peekPending()
156 protected ByteBuffer removePending() in removePending()
166 public void send( ByteBuffer data ) in send()
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/authoring/builder/
DByteBufferHelper.java18 import java.nio.ByteBuffer;
27 public static List<ByteBuffer> mergeAdjacentBuffers(List<ByteBuffer> samples) { in mergeAdjacentBuffers()
28 ArrayList<ByteBuffer> nuSamples = new ArrayList<ByteBuffer>(samples.size()); in mergeAdjacentBuffers()
29 for (ByteBuffer buffer : samples) { in mergeAdjacentBuffers()
33 ByteBuffer oldBuffer = nuSamples.remove(lastIndex); in mergeAdjacentBuffers()
34ByteBuffer nu = ByteBuffer.wrap(buffer.array(), oldBuffer.arrayOffset(), oldBuffer.limit() + buffe… in mergeAdjacentBuffers()
41 ByteBuffer oldBuffer = nuSamples.get(lastIndex); in mergeAdjacentBuffers()
/external/mp4parser/isoparser/src/main/java/com/coremedia/iso/boxes/mdat/
DMediaDataBox.java28 import java.nio.ByteBuffer;
56 ByteBuffer header;
64 private Map<Long, Reference<ByteBuffer>> cache = new HashMap<Long, Reference<ByteBuffer>>();
71 private ByteBuffer content;
118 ByteBuffer h2 = ByteBuffer.allocate(header.limit()); in checkStillOk()
138 …public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, Bo… in parse()
148 cache.put(0l, new SoftReference<ByteBuffer>(content)); in parse()
152 public synchronized ByteBuffer getContent(long offset, int length) { in getContent()
156 ByteBuffer cacheEntry = cache.get(chacheEntryOffset).get(); in getContent()
160 ByteBuffer cachedSample = cacheEntry.slice(); in getContent()
[all …]
/external/apache-harmony/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/
DWrappedByteBufferTest.java19 import java.nio.ByteBuffer;
25 buf = ByteBuffer.wrap(new byte[BUFFER_LENGTH]); in setUp()
42 ByteBuffer.wrap(array, -1, 0); in testWrappedByteBuffer_IllegalArg()
48 ByteBuffer.wrap(array, BUFFER_LENGTH + 1, 0); in testWrappedByteBuffer_IllegalArg()
54 ByteBuffer.wrap(array, 0, -1); in testWrappedByteBuffer_IllegalArg()
60 ByteBuffer.wrap(array, 0, BUFFER_LENGTH + 1); in testWrappedByteBuffer_IllegalArg()
66 ByteBuffer.wrap(array, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg()
72 ByteBuffer.wrap(array, Integer.MAX_VALUE, 1); in testWrappedByteBuffer_IllegalArg()
78 ByteBuffer.wrap((byte[])null, 1, Integer.MAX_VALUE); in testWrappedByteBuffer_IllegalArg()
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/boxes/mp4/samplegrouping/
DUnknownEntry.java21 import java.nio.ByteBuffer;
27 private ByteBuffer content;
32 public ByteBuffer getContent() { in getContent()
36 public void setContent(ByteBuffer content) { in setContent()
37 this.content = (ByteBuffer) content.duplicate().rewind(); in setContent()
41 public void parse(ByteBuffer byteBuffer) { in parse()
42 this.content = (ByteBuffer) byteBuffer.duplicate().rewind(); in parse()
46 public ByteBuffer get() { in get()
52 ByteBuffer bb = content.duplicate(); in toString()
/external/mp4parser/isoparser/src/main/java/com/coremedia/iso/boxes/
DItemDataBox.java5 import java.nio.ByteBuffer;
11 ByteBuffer data = ByteBuffer.allocate(0);
19 public ByteBuffer getData() { in getData()
23 public void setData(ByteBuffer data) { in setData()
34 public void _parseDetails(ByteBuffer content) { in _parseDetails()
40 protected void getContent(ByteBuffer byteBuffer) { in getContent()
/external/apache-harmony/crypto/src/test/impl/java.injected/org/apache/harmony/crypto/internal/
DNullCipherSpiTest.java24 import java.nio.ByteBuffer;
112 ByteBuffer inbuf = ByteBuffer.wrap(b,0,b.length); in testEngineUpdateByteBufferByteBuffer()
113 ByteBuffer outbuf = ByteBuffer.allocate(6); in testEngineUpdateByteBufferByteBuffer()
137 inbuf = ByteBuffer.wrap(b,0,b.length); in testEngineUpdateByteBufferByteBuffer()
138 outbuf = ByteBuffer.allocate(5); in testEngineUpdateByteBufferByteBuffer()
157 ByteBuffer inbuf = ByteBuffer.wrap(b,0,b.length); in testEngineDoFinalByteBufferByteBuffer()
158 ByteBuffer outbuf = ByteBuffer.allocate(6); in testEngineDoFinalByteBufferByteBuffer()
182 inbuf = ByteBuffer.wrap(b,0,b.length); in testEngineDoFinalByteBufferByteBuffer()
183 outbuf = ByteBuffer.allocate(5); in testEngineDoFinalByteBufferByteBuffer()
/external/apache-harmony/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/
DSSLEngineImplTest.java20 import java.nio.ByteBuffer;
372 engine.wrap(ByteBuffer.allocate(0), ByteBuffer.allocate( in testSetGetUseClientMode()
446 SSLEngineResult result = engine.wrap(ByteBuffer.allocate(0), in testCloseOutbound()
447 ByteBuffer.allocate(20000)); in testCloseOutbound()
467 SSLEngineResult result = engine.wrap(ByteBuffer.allocate(0), in testCloseInbound()
468 ByteBuffer.allocate(20000)); in testCloseInbound()
495 ByteBuffer buffer = ByteBuffer.allocate(packetBufferSize); in testCloseInbound2()
496 ByteBuffer app_data_buffer = ByteBuffer.allocate(applicationBufferSize); in testCloseInbound2()
528 print(result = server.wrap(ByteBuffer.allocate(0), buffer)); in testCloseInbound2()
588 ByteBuffer buffer = ByteBuffer.allocate(packetBufferSize); in testErrorProcessing()
[all …]
/external/jmonkeyengine/engine/src/networking/com/jme3/network/base/
DMessageProtocol.java38 import java.nio.ByteBuffer;
58 private ByteBuffer current;
67 public static ByteBuffer messageToBuffer( Message message, ByteBuffer target ) in messageToBuffer()
70 ByteBuffer buffer = target == null ? ByteBuffer.allocate( 32767 + 2 ) : target; in messageToBuffer()
106 public int addBuffer( ByteBuffer buffer ) in addBuffer()
142 current = ByteBuffer.allocate(size); in addBuffer()
178 protected void createMessage( ByteBuffer buffer ) in createMessage()
/external/jmonkeyengine/engine/src/core/com/jme3/texture/
DImage.java39 import java.nio.ByteBuffer;
316 protected ArrayList<ByteBuffer> data;
344 clone.data = data != null ? new ArrayList<ByteBuffer>(data) : null; in clone()
355 data = new ArrayList<ByteBuffer>(1); in Image()
377 public Image(Format format, int width, int height, int depth, ArrayList<ByteBuffer> data, in Image()
409 public Image(Format format, int width, int height, ByteBuffer data, in Image()
422 this.data = new ArrayList<ByteBuffer>(1); in Image()
441 public Image(Format format, int width, int height, int depth, ArrayList<ByteBuffer> data) { in Image()
458 public Image(Format format, int width, int height, ByteBuffer data) { in Image()
495 public void setData(ArrayList<ByteBuffer> data) { in setData()
[all …]
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/
DAbstractBox.java30 import java.nio.ByteBuffer;
56 private ByteBuffer content;
57 private ByteBuffer deadBytes = null;
85 protected abstract void getContent(ByteBuffer byteBuffer); in getContent()
92 protected abstract void _parseDetails(ByteBuffer content); in _parseDetails()
103 …public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, Bo… in parse()
122 ByteBuffer bb = ByteBuffer.allocate(l2i(getSize()));
147 ByteBuffer content = this.content; in parseDetails()
164 protected void setDeadBytes(ByteBuffer newDeadBytes) { in setDeadBytes()
224 private boolean verify(ByteBuffer content) { in verify()
[all …]

12345678910>>...15