| /cts/tests/tests/os/src/android/os/cts/ |
| SharedMemoryTest.java | 114 ByteBuffer buffer = sharedMemory.mapReadWrite(); local 118 buffer.put(0, expected); 119 assertEquals(expected, buffer.get(0)); 127 assertEquals(expected, buffer.get(0)); 128 SharedMemory.unmap(buffer); 135 ByteBuffer buffer = sharedMemory.mapReadWrite(); local 140 buffer.put(0, expected); 141 assertEquals(expected, buffer.get(0)); 151 buffer.put(0, expected); 152 assertEquals(expected, buffer.get(0)) 161 ByteBuffer buffer; local 183 ByteBuffer buffer = sharedMemory.mapReadWrite(); local 201 ByteBuffer buffer = sharedMemory.mapReadWrite(); local 252 ByteBuffer buffer = null; local [all...] |
| /developers/build/prebuilts/gradle/BasicMediaDecoder/Application/src/main/java/com/example/android/common/media/ |
| MediaCodecWrapper.java | 31 * Simplifies the MediaCodec interface by wrapping around the buffer processing operations. 52 void outputSample(MediaCodecWrapper sender, MediaCodec.BufferInfo info, ByteBuffer buffer); 62 // to keep track of which buffer is which. 74 // Information about each output buffer, by index. Each entry in this array 171 * @param input A ByteBuffer containing the input data for one sample. The buffer must be set 176 * at which this buffer should be rendered. 193 ByteBuffer buffer = mInputBuffers[index]; local 195 // we can't write our sample to a lesser capacity input buffer. 196 if (size > buffer.capacity()) { 198 "Insufficient capacity in MediaCodec buffer: 247 ByteBuffer buffer = mInputBuffers[index]; local [all...] |
| /developers/build/prebuilts/gradle/MediaRecorder/Application/src/main/java/com/example/android/common/media/ |
| MediaCodecWrapper.java | 31 * Simplifies the MediaCodec interface by wrapping around the buffer processing operations. 52 void outputSample(MediaCodecWrapper sender, MediaCodec.BufferInfo info, ByteBuffer buffer); 62 // to keep track of which buffer is which. 74 // Information about each output buffer, by index. Each entry in this array 171 * @param input A ByteBuffer containing the input data for one sample. The buffer must be set 176 * at which this buffer should be rendered. 193 ByteBuffer buffer = mInputBuffers[index]; local 195 // we can't write our sample to a lesser capacity input buffer. 196 if (size > buffer.capacity()) { 198 "Insufficient capacity in MediaCodec buffer: 247 ByteBuffer buffer = mInputBuffers[index]; local [all...] |
| /developers/samples/android/common/src/java/com/example/android/common/media/ |
| MediaCodecWrapper.java | 31 * Simplifies the MediaCodec interface by wrapping around the buffer processing operations. 52 void outputSample(MediaCodecWrapper sender, MediaCodec.BufferInfo info, ByteBuffer buffer); 62 // to keep track of which buffer is which. 74 // Information about each output buffer, by index. Each entry in this array 171 * @param input A ByteBuffer containing the input data for one sample. The buffer must be set 176 * at which this buffer should be rendered. 193 ByteBuffer buffer = mInputBuffers[index]; local 195 // we can't write our sample to a lesser capacity input buffer. 196 if (size > buffer.capacity()) { 198 "Insufficient capacity in MediaCodec buffer: 247 ByteBuffer buffer = mInputBuffers[index]; local [all...] |
| /development/samples/TtsEngine/src/com/example/android/ttsengine/ |
| RobotSpeakTtsService.java | 235 ByteBuffer buffer = ByteBuffer.wrap(mAudioBuffer).order(ByteOrder.LITTLE_ENDIAN); local 266 buffer.putShort((short)(getAmplitude() * -1)); 269 buffer.putShort(getAmplitude()); 275 buffer.putShort((short) 0);
|
| /development/samples/browseable/BasicMediaDecoder/src/com.example.android.common.media/ |
| MediaCodecWrapper.java | 30 * Simplifies the MediaCodec interface by wrapping around the buffer processing operations. 51 void outputSample(MediaCodecWrapper sender, MediaCodec.BufferInfo info, ByteBuffer buffer); 61 // to keep track of which buffer is which. 73 // Information about each output buffer, by index. Each entry in this array 174 * @param input A ByteBuffer containing the input data for one sample. The buffer must be set 179 * at which this buffer should be rendered. 196 ByteBuffer buffer = mInputBuffers[index]; local 198 // we can't write our sample to a lesser capacity input buffer. 199 if (size > buffer.capacity()) { 201 "Insufficient capacity in MediaCodec buffer: 251 ByteBuffer buffer = mInputBuffers[index]; local 315 ByteBuffer buffer = mOutputBuffers[index]; local [all...] |
| /development/samples/browseable/BasicRenderScript/src/com.example.android.common.media/ |
| MediaCodecWrapper.java | 30 * Simplifies the MediaCodec interface by wrapping around the buffer processing operations. 51 void outputSample(MediaCodecWrapper sender, MediaCodec.BufferInfo info, ByteBuffer buffer); 61 // to keep track of which buffer is which. 73 // Information about each output buffer, by index. Each entry in this array 174 * @param input A ByteBuffer containing the input data for one sample. The buffer must be set 179 * at which this buffer should be rendered. 196 ByteBuffer buffer = mInputBuffers[index]; local 198 // we can't write our sample to a lesser capacity input buffer. 199 if (size > buffer.capacity()) { 201 "Insufficient capacity in MediaCodec buffer: 251 ByteBuffer buffer = mInputBuffers[index]; local 315 ByteBuffer buffer = mOutputBuffers[index]; local [all...] |
| /development/samples/browseable/MediaRecorder/src/com.example.android.common.media/ |
| MediaCodecWrapper.java | 30 * Simplifies the MediaCodec interface by wrapping around the buffer processing operations. 51 void outputSample(MediaCodecWrapper sender, MediaCodec.BufferInfo info, ByteBuffer buffer); 61 // to keep track of which buffer is which. 73 // Information about each output buffer, by index. Each entry in this array 174 * @param input A ByteBuffer containing the input data for one sample. The buffer must be set 179 * at which this buffer should be rendered. 196 ByteBuffer buffer = mInputBuffers[index]; local 198 // we can't write our sample to a lesser capacity input buffer. 199 if (size > buffer.capacity()) { 201 "Insufficient capacity in MediaCodec buffer: 251 ByteBuffer buffer = mInputBuffers[index]; local 315 ByteBuffer buffer = mOutputBuffers[index]; local [all...] |
| /external/apache-harmony/support/src/test/java/org/apache/harmony/testframework/ |
| CharWrapperTester.java | 91 return decode(delegate.buffer.toString().toCharArray()); 194 private final StringBuilder buffer = new StringBuilder(); field in class:CharWrapperTester.ClosableStringWriter 211 buffer.append(buf, offset, count);
|
| /external/apache-harmony/support/src/test/java/tests/support/ |
| Support_Configuration.java | 224 StringBuffer key = new StringBuffer(), value = new StringBuffer(), buffer = key; local 237 buffer.append((char) unicode); 293 if (key.length() > 0 || buffer == value) { 298 buffer = key; 305 if (buffer == key) { 306 buffer = value; 316 if (buffer.length() == 0 || mode == IGNORE) { 319 if (buffer == key) { 330 buffer = value; 333 buffer.append((char) nextChar) [all...] |
| /external/archive-patcher/shared/src/main/java/com/google/archivepatcher/shared/ |
| DefaultDeflateCompatibilityWindow.java | 232 ByteArrayOutputStream buffer = new ByteArrayOutputStream(); local 243 buffer.write(loremIpsumBytes, 0, x); 245 return buffer.toByteArray(); 270 StringBuilder buffer = new StringBuilder(); local 274 buffer.append('0'); 276 buffer.append(Integer.toHexString(value)); 278 return buffer.toString(); 343 ByteArrayOutputStream buffer = new ByteArrayOutputStream(); local 345 compressor.compress(new ByteArrayInputStream(CorpusHolder.CORPUS_INSTANCE), buffer); 349 byte[] compressedData = buffer.toByteArray() [all...] |
| /external/jacoco/org.jacoco.core/src/org/jacoco/core/instr/ |
| Instrumenter.java | 97 * @param buffer 105 public byte[] instrument(final byte[] buffer, final String name) 108 return instrument(new ClassReader(buffer)); 261 final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); local 262 final int count = instrumentAll(unpackedInput, buffer, name); 263 Pack200Streams.pack(buffer.toByteArray(), output); 269 final byte[] buffer = new byte[1024]; 271 while ((len = read(input, buffer, name)) != -1) { 272 output.write(buffer, 0, len); 276 private int read(final InputStream input, final byte[] buffer, [all...] |
| /external/jacoco/org.jacoco.core.test/src/org/jacoco/core/internal/ |
| ContentTypeDetectorTest.java | 126 final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); local 127 final ZipOutputStream zip = new ZipOutputStream(buffer); 131 initData(buffer.toByteArray()); 155 final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); local 156 final OutputStream gz = new GZIPOutputStream(buffer); 159 initData(buffer.toByteArray());
|
| /external/libmojo/mojo/public/java/bindings/src/org/chromium/mojo/bindings/ |
| MessageHeader.java | 206 * Set the request id on the message contained in the given buffer. 208 void setRequestId(ByteBuffer buffer, long requestId) { 209 assert mustHaveRequestId(buffer.getInt(FLAGS_OFFSET)); 210 buffer.putLong(REQUEST_ID_OFFSET, requestId);
|
| /external/libphonenumber/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/ |
| FlyweightMapStorage.java | 76 // Fill the phone number prefixes byte buffer, the set of possible lengths of prefixes and the 191 * buffer} at the specified {@code index}. 195 * @param outputBuffer the byte buffer to which the value is stored 196 * @param index the index where the value is stored in the buffer 210 * Writes the value read from the provided byte {@code buffer} at the specified {@code index} to 215 * @param inputBuffer the byte buffer from which the value is read 216 * @param index the index of the value in the the byte buffer 230 * Reads the {@code value} at the specified {@code index} from the provided byte {@code buffer}. 233 * @param buffer the byte buffer from which the value is rea [all...] |
| /external/okhttp/okhttp-ws/src/main/java/com/squareup/okhttp/internal/ws/ |
| WebSocketReader.java | 24 import okio.Buffer; 56 void onPing(Buffer buffer); 57 void onPong(Buffer buffer); 161 Buffer buffer = null; local 163 buffer = new Buffer(); 166 source.readFully(buffer, frameLength) [all...] |
| WebSocketWriter.java | 20 import okio.Buffer; 55 private final Buffer buffer = new Buffer(); field in class:WebSocketWriter 76 public void writePing(Buffer payload) throws IOException { 83 public void writePong(Buffer payload) throws IOException { 98 Buffer payload = null; 103 payload = new Buffer(); 116 private void writeControlFrameSynchronized(int opcode, Buffer payload) throws IOException { 205 writeMaskedSynchronized(buffer, byteCount) [all...] |
| /external/okhttp/okio/okio/src/test/java/okio/ |
| SegmentSharingTest.java | 34 ByteString snapshot = new Buffer().snapshot(); 67 Buffer out = new Buffer(); 77 Buffer buffer = concatenateBuffers(xs, ys, zs); local 78 ByteString snapshot = buffer.snapshot(); 81 // While locking the pool, confirm that clearing the buffer doesn't release its segments. 85 buffer.clear(); 95 Buffer buffer = concatenateBuffers(xs, ys, zs) local [all...] |
| /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
| StringBufferTest.java | 33 StringBuffer buffer = new StringBuffer("abcde"); local 35 buffer.setLength(-1); 41 assertEquals("abcde", buffer.toString()); 42 buffer.setLength(1); 43 buffer.append('f'); 44 assertEquals("af", buffer.toString()); 46 buffer = new StringBuffer("abcde"); 47 assertEquals("cde", buffer.substring(2)); 48 buffer.setLength(3); 49 buffer.append('f') 95 StringBuffer buffer = new StringBuffer(); local 125 StringBuffer buffer = new StringBuffer(25); local [all...] |
| /libcore/ojluni/src/main/java/sun/nio/fs/ |
| LinuxUserDefinedFileAttributeView.java | 64 // Parses buffer as array of NULL-terminated C strings. 106 NativeBuffer buffer = null; local 109 buffer = NativeBuffers.getNativeBuffer(size); 112 int n = flistxattr(fd, buffer.address(), size); 113 List<String> list = asList(buffer.address(), n); 116 // allocate larger buffer if required 118 buffer.release(); 120 buffer = null; 121 buffer = NativeBuffers.getNativeBuffer(size); 130 if (buffer != null 300 NativeBuffer buffer = null; local 362 NativeBuffer buffer = NativeBuffers.getNativeBuffer(size); local [all...] |
| /libcore/ojluni/src/main/java/sun/security/util/ |
| DerInputStream.java | 67 DerInputBuffer buffer; field in class:DerInputStream 73 * Create a DER input stream from a data buffer. The buffer is not 74 * copied, it is shared. Accordingly, the buffer should be treated 77 * @param data the buffer from which to create the string (CONSUMED) 84 * Create a DER input stream from part of a data buffer. 85 * The buffer is not copied, it is shared. Accordingly, the 86 * buffer should be treated as read-only. 88 * @param data the buffer from which to create the string (CONSUMED) 91 * @param len how long a chunk of the buffer to use [all...] |
| /libcore/support/src/test/java/org/apache/harmony/testframework/ |
| CharWrapperTester.java | 91 return decode(delegate.buffer.toString().toCharArray()); 194 private final StringBuilder buffer = new StringBuilder(); field in class:CharWrapperTester.ClosableStringWriter 211 buffer.append(buf, offset, count);
|
| /packages/apps/Launcher3/src/com/android/launcher3/graphics/ |
| DragPreviewProvider.java | 199 ByteBuffer buffer = ByteBuffer.wrap(pixels); local 200 buffer.rewind(); 201 preview.copyPixelsToBuffer(buffer); 209 buffer.rewind(); 210 preview.copyPixelsFromBuffer(buffer);
|
| /packages/apps/Nfc/src/com/android/nfc/ndefpush/ |
| NdefPushServer.java | 75 ByteArrayOutputStream buffer = new ByteArrayOutputStream(1024); local 89 buffer.write(partial, 0, size); 99 NdefPushProtocol msg = new NdefPushProtocol(buffer.toByteArray());
|
| /tools/apksig/src/main/java/com/android/apksig/internal/util/ |
| VerityTreeBuilder.java | 173 ByteBuffer buffer = ByteBuffer.allocate(CHUNK_SIZE); local 174 dataSource.copyTo(offset, CHUNK_SIZE, buffer); 175 buffer.rewind(); 176 byte[] hash = saltedDigest(buffer); 183 ByteBuffer buffer; local 184 buffer = ByteBuffer.allocate(CHUNK_SIZE); // initialized to 0. 185 dataSource.copyTo(offset, remaining, buffer); 186 buffer.rewind(); 188 byte[] hash = saltedDigest(buffer); 208 /** Returns a slice of the buffer with shared the content. * [all...] |