/third_party/icu/icu4j/main/classes/core/src/com/ibm/icu/impl/ |
H A D | ICUBinary.java | 18 import java.nio.ByteBuffer; 33 * Most methods do not modify the ByteBuffer in any way, 51 * Checks that the ByteBuffer contains a valid, usable ICU .dat package. 54 static boolean validate(ByteBuffer bytes) { in validate() 77 private static boolean startsWithPackageName(ByteBuffer bytes, int start) { in startsWithPackageName() 93 static ByteBuffer getData(ByteBuffer bytes, CharSequence key) { in getData() 96 ByteBuffer data = bytes.duplicate(); in getData() 105 static void addBaseNamesInFolder(ByteBuffer bytes, String folder, String suffix, Set<String> names) { in addBaseNamesInFolder() 120 private static int binarySearch(ByteBuffer byte [all...] |
/third_party/icu/ohos_icu4j/src/main/java/ohos/global/icu/impl/ |
H A D | ICUBinary.java | 19 import java.nio.ByteBuffer; 37 * Most methods do not modify the ByteBuffer in any way, 55 * Checks that the ByteBuffer contains a valid, usable ICU .dat package. 58 static boolean validate(ByteBuffer bytes) { in validate() 81 private static boolean startsWithPackageName(ByteBuffer bytes, int start) { in startsWithPackageName() 97 static ByteBuffer getData(ByteBuffer bytes, CharSequence key) { in getData() 100 ByteBuffer data = bytes.duplicate(); in getData() 109 static void addBaseNamesInFolder(ByteBuffer bytes, String folder, String suffix, Set<String> names) { in addBaseNamesInFolder() 124 private static int binarySearch(ByteBuffer byte [all...] |
/third_party/protobuf/java/core/src/test/java/com/google/protobuf/ |
H A D | ByteBufferWriterTest.java | 35 import java.nio.ByteBuffer; 45 testWrite(ByteBuffer.allocate(100)); in testHeapBuffer() 46 testWrite(ByteBuffer.allocate(1024 * 100)); in testHeapBuffer() 51 testWrite(ByteBuffer.allocateDirect(100)); in testDirectBuffer() 52 testWrite(ByteBuffer.allocateDirect(1024 * 100)); in testDirectBuffer() 55 private void testWrite(ByteBuffer buffer) throws IOException { in testWrite() 63 private void fillRandom(ByteBuffer buf) { in fillRandom() 71 private byte[] toArray(ByteBuffer buf) { in toArray()
|
H A D | AbstractProto3SchemaTest.java | 40 import java.nio.ByteBuffer; 53 protected List<ByteBuffer> serializedBytesWithInvalidUtf8() throws IOException { in serializedBytesWithInvalidUtf8() 54 List<ByteBuffer> invalidBytes = new ArrayList<>(); in serializedBytesWithInvalidUtf8() 57 ByteBuffer buffer = ByteBuffer.allocate(100); in serializedBytesWithInvalidUtf8() 65 ByteBuffer buffer = ByteBuffer.allocate(100); in serializedBytesWithInvalidUtf8()
|
H A D | AbstractProto3LiteSchemaTest.java | 40 import java.nio.ByteBuffer; 53 protected List<ByteBuffer> serializedBytesWithInvalidUtf8() throws IOException { in serializedBytesWithInvalidUtf8() 54 List<ByteBuffer> invalidBytes = new ArrayList<>(); in serializedBytesWithInvalidUtf8() 57 ByteBuffer buffer = ByteBuffer.allocate(100); in serializedBytesWithInvalidUtf8() 65 ByteBuffer buffer = ByteBuffer.allocate(100); in serializedBytesWithInvalidUtf8()
|
H A D | NioByteStringTest.java | 45 import java.nio.ByteBuffer; 53 private static final ByteString EMPTY = new NioByteString(ByteBuffer.wrap(new byte[0])); 58 private final ByteBuffer backingBuffer = ByteBuffer.wrap(BYTES.clone()); 195 ByteBuffer myBuffer = ByteBuffer.allocate(BYTES.length); in testCopyTo_ByteBuffer() 199 CLASSNAME + ".copyTo(ByteBuffer) must give back the same bytes", backingBuffer, myBuffer); in testCopyTo_ByteBuffer() 202 myBuffer = ByteBuffer.allocate(testString.size() + 1); in testCopyTo_ByteBuffer() 208 myBuffer = ByteBuffer.allocate(0); in testCopyTo_ByteBuffer() 211 fail("Should have thrown an exception when target ByteBuffer ha in testCopyTo_ByteBuffer() [all...] |
H A D | DecodeUtf8Test.java | 6 import java.nio.ByteBuffer; 200 ByteBuffer direct = ByteBuffer.allocateDirect(bytes.length); in assertInvalid() 216 ByteBuffer heap = ByteBuffer.allocate(bytes.length); in assertInvalid() 247 ByteBuffer direct = ByteBuffer.allocateDirect(bytes.length); in assertInvalidSlice() 263 ByteBuffer heap = ByteBuffer.allocate(bytes.length); in assertInvalidSlice() 294 ByteBuffer direc in assertRoundTrips() [all...] |
H A D | Utf8Test.java | 33 import java.nio.ByteBuffer; 106 ByteBuffer buffer = ByteBuffer.wrap(data); in assertIsValid() 113 buffer = ByteBuffer.allocateDirect(data.length); in assertIsValid() 173 // ByteBuffer + safeProcessor will not exit early. We can't match the message since we don't in assertEncoding_insufficientSpace() 183 // ByteBuffer + safeProcessor will not exit early. We can't match the message since we don't in assertEncoding_insufficientSpace() 193 // Direct ByteBuffer + unsafeProcessor will exit early if it's not on Android, so we can in assertEncoding_insufficientSpace() 194 // match the message. On Android, a direct ByteBuffer will have hasArray() being true and in assertEncoding_insufficientSpace() 210 ByteBuffer buffer = direct ? ByteBuffer in encodeToByteBuffer() [all...] |
/third_party/skia/third_party/externals/brotli/java/org/brotli/wrapper/dec/ |
H A D | DecoderJNI.java | 10 import java.nio.ByteBuffer; 16 private static native ByteBuffer nativeCreate(long[] context); in nativeCreate() 18 private static native ByteBuffer nativePull(long[] context); in nativePull() 31 private final ByteBuffer inputBuffer; 80 public ByteBuffer getInputBuffer() { in getInputBuffer() 88 public ByteBuffer pull() { in pull() 96 ByteBuffer result = nativePull(context); in pull()
|
H A D | Decoder.java | 11 import java.nio.ByteBuffer; 19 private static final ByteBuffer EMPTY_BUFER = ByteBuffer.allocate(0); 22 ByteBuffer buffer; 86 ByteBuffer inputBuffer = decoder.getInputBuffer(); in decode() 117 int consume(ByteBuffer dst) { in consume() 118 ByteBuffer slice = buffer.slice(); in consume() 152 ByteBuffer buffer = decoder.pull(); in decompress()
|
/third_party/skia/third_party/externals/brotli/java/org/brotli/wrapper/common/ |
H A D | BrotliCommon.java | 11 import java.nio.ByteBuffer; 61 * Copy bytes to a new direct ByteBuffer. 65 public static ByteBuffer makeNative(byte[] data) { in makeNative() 66 ByteBuffer result = ByteBuffer.allocateDirect(data.length); in makeNative() 94 ByteBuffer copy = ByteBuffer.allocateDirect(RFC_DICTIONARY_SIZE); in setDictionaryData() 113 public static void setDictionaryData(ByteBuffer data) { in setDictionaryData()
|
/third_party/libphonenumber/java/internal/prefixmapper/src/com/google/i18n/phonenumbers/prefixmapper/ |
H A D | FlyweightMapStorage.java | 22 import java.nio.ByteBuffer; 47 private ByteBuffer phoneNumberPrefixes; 48 private ByteBuffer descriptionIndexes; 74 phoneNumberPrefixes = ByteBuffer.allocate(numOfEntries * prefixSizeInBytes); in readFromSortedMap() 95 descriptionIndexes = ByteBuffer.allocate(numOfEntries * descIndexSizeInBytes); in createDescriptionPool() 143 phoneNumberPrefixes = ByteBuffer.allocate(numOfEntries * prefixSizeInBytes); in readEntries() 146 descriptionIndexes = ByteBuffer.allocate(numOfEntries * descIndexSizeInBytes); in readEntries() 200 ByteBuffer outputBuffer, int index) throws IOException { in readExternalWord() 220 ByteBuffer inputBuffer, int index) throws IOException { in writeExternalWord() 239 private static int readWordFromBuffer(ByteBuffer buffe [all...] |
/third_party/protobuf/java/core/src/main/java/com/google/protobuf/ |
H A D | NioByteString.java | 40 import java.nio.ByteBuffer; 47 /** A {@link ByteString} that wraps around a {@link ByteBuffer}. */ 49 private final ByteBuffer buffer; 51 NioByteString(ByteBuffer buffer) { in NioByteString() 86 // it isn't possible to avoid the bounds checking inside of ByteBuffer, so just use the default in internalByteAt() 99 ByteBuffer slice = slice(beginIndex, endIndex); in substring() 111 ByteBuffer slice = buffer.slice(); in copyToInternal() 117 public void copyTo(ByteBuffer target) { in copyTo() 150 public ByteBuffer asReadOnlyByteBuffer() { in asReadOnlyByteBuffer() 155 public List<ByteBuffer> asReadOnlyByteBufferLis [all...] |
H A D | Internal.java | 35 import java.nio.ByteBuffer; 125 * <p>This is like {@link #bytesDefaultValue}, but returns a ByteBuffer. 127 public static ByteBuffer byteBufferDefaultValue(String bytes) { in byteBufferDefaultValue() 128 return ByteBuffer.wrap(byteArrayDefaultValue(bytes)); in byteBufferDefaultValue() 132 * Create a new ByteBuffer and copy all the content of {@code source} ByteBuffer to the new 133 * ByteBuffer. The new ByteBuffer's limit and capacity will be source.capacity(), and its position 134 * will be 0. Note that the state of {@code source} ByteBuffer won't be changed. 136 public static ByteBuffer copyByteBuffe [all...] |
H A D | AllocatedBuffer.java | 35 import java.nio.ByteBuffer; 44 * Indicates whether this buffer contains a backing {@link ByteBuffer} (i.e. it is safe to call 56 * Returns the {@link ByteBuffer} that backs this buffer <i>(optional operation)</i>. 59 * has a backing {@link ByteBuffer}. 61 * @return The {@link ByteBuffer} that backs this buffer 62 * @throws UnsupportedOperationException If this buffer is not backed by a {@link ByteBuffer}. 64 public abstract ByteBuffer nioBuffer(); in nioBuffer() 150 * Creates a new {@link AllocatedBuffer} that is backed by the given {@link ByteBuffer}. The 153 public static AllocatedBuffer wrap(final ByteBuffer buffer) { in wrap() 164 public ByteBuffer nioBuffe in wrap() [all...] |
H A D | IterableByteBufferInputStream.java | 37 import java.nio.ByteBuffer; 41 /** The {@link Iterator} with type {@link ByteBuffer} of {@code input} */ 42 private Iterator<ByteBuffer> iterator; 43 /** The current ByteBuffer; */ 44 private ByteBuffer currentByteBuffer; 48 * Current {@code ByteBuffer}'s index 53 /** The current position for current ByteBuffer */ 55 /** Whether current ByteBuffer has an array */ 58 * If the current ByteBuffer is unsafe-direct based, currentArray is null; otherwise should be the 59 * array inside ByteBuffer [all...] |
/third_party/skia/third_party/externals/brotli/java/org/brotli/wrapper/enc/ |
H A D | EncoderJNI.java | 10 import java.nio.ByteBuffer; 16 private static native ByteBuffer nativeCreate(long[] context); in nativeCreate() 18 private static native ByteBuffer nativePull(long[] context); in nativePull() 29 private final ByteBuffer inputBuffer; 83 ByteBuffer getInputBuffer() { in getInputBuffer() 87 ByteBuffer pull() { in pull()
|
/third_party/vk-gl-cts/execserver/ |
H A D | xsTestDriver.hpp | 46 bool poll (ByteBuffer& messageBuffer); 61 bool pollLogFile (ByteBuffer& messageBuffer); 62 bool pollInfo (ByteBuffer& messageBuffer); 63 bool pollBuffer (ByteBuffer& messageBuffer, MessageType msgType); 65 bool writeMessage (ByteBuffer& messageBuffer, const Message& message);
|
/third_party/icu/icu4j/perf-tests/src/com/ibm/icu/dev/test/perf/ |
H A D | ConverterPerformanceTest.java | 16 import java.nio.ByteBuffer; 47 ByteBuffer target = encoder.encode(source); in setup() 210 ByteBuffer srcBuf = ByteBuffer.wrap(encBuffer,0,encBuffer.length); in TestCharsetDecoder() 237 ByteBuffer outBuf = ByteBuffer.allocate(encBuffer.length); in TestCharsetEncoder() 268 ByteBuffer srcBuf = ByteBuffer.wrap(encBuffer,0,encBuffer.length); in TestCharsetDecoderICU() 295 ByteBuffer outBuf = ByteBuffer in TestCharsetEncoderICU() [all...] |
/third_party/skia/third_party/externals/brotli/java/org/brotli/enc/ |
H A D | PreparedDictionaryGenerator.java | 10 import java.nio.ByteBuffer; 24 private final ByteBuffer data; 26 private PreparedDictionaryImpl(ByteBuffer data) { in PreparedDictionaryImpl() 31 public ByteBuffer getData() { in getData() 39 public static PreparedDictionary generate(ByteBuffer src) { in generate() 43 public static PreparedDictionary generate(ByteBuffer src, in generate() 130 ByteBuffer flat = ByteBuffer.allocateDirect(allocSize); in generate() 131 ByteBuffer pointer = flat.slice(); in generate() 142 ByteBuffer sourceCop in generate() [all...] |
/third_party/icu/icu4j/main/classes/charset/src/com/ibm/icu/charset/ |
H A D | CharsetDecoderICU.java | 14 import java.nio.ByteBuffer; 61 public CoderResult call(CharsetDecoderICU decoder, Object context, ByteBuffer source, 191 private final ByteBuffer EMPTY = ByteBuffer.allocate(0); 242 protected CoderResult decodeLoop(ByteBuffer in,CharBuffer out){ in decodeLoop() 270 abstract CoderResult decodeLoop(ByteBuffer in, CharBuffer out, IntBuffer offsets, boolean flush); in decodeLoop() 282 final CoderResult decode(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush) { in decode() 396 final CoderResult toUnicodeWithCallback(ByteBuffer source, CharBuffer target, IntBuffer offsets, boolean flush){ in toUnicodeWithCallback() 404 ByteBuffer replayArray = ByteBuffer in toUnicodeWithCallback() [all...] |
H A D | CharsetEncoderICU.java | 15 import java.nio.ByteBuffer; 75 CharBuffer source, ByteBuffer target, IntBuffer offsets, 228 protected CoderResult implFlush(ByteBuffer out) { in implFlush() 261 protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out) { in encodeLoop() 287 abstract CoderResult encodeLoop(CharBuffer source, ByteBuffer target, in encodeLoop() 299 final CoderResult encode(CharBuffer source, ByteBuffer target, in encode() 391 ByteBuffer target, IntBuffer offsets, boolean flush) { in fromUnicodeWithCallback() 699 byte[] bytesArray, int bytesBegin, int bytesLength, ByteBuffer out, in fromUWriteBytes() 777 ByteBuffer target, IntBuffer offsets) { in cbFromUWriteSub() 798 CharBuffer source, ByteBuffer targe in cbFromUWriteUChars() [all...] |
/third_party/icu/icu4j/main/tests/charset/src/com/ibm/icu/dev/test/charset/ |
H A D | TestCharset.java | 13 import java.nio.ByteBuffer; 60 ByteBuffer bs1 = ByteBuffer.allocate(0xFF*8); in TestUTF16Converter() 61 ByteBuffer bs2 = ByteBuffer.allocate(0xFF*8); in TestUTF16Converter() 119 ByteBuffer newBS = ByteBuffer.allocate(bs1.capacity()); in TestUTF16Converter() 153 ByteBuffer bs1 = ByteBuffer.allocate(0xFF*8); in TestUTF32Converter() 154 ByteBuffer bs in TestUTF32Converter() [all...] |
/third_party/skia/third_party/externals/brotli/java/org/brotli/dec/ |
H A D | DictionaryData.java | 9 import java.nio.ByteBuffer; 14 * When this class is loaded, it sets its data: {@link Dictionary#setData(ByteBuffer)}. 36 private static void unpackDictionaryData(ByteBuffer dictionary, String data0, String data1, in unpackDictionaryData() 65 ByteBuffer dictionary = ByteBuffer.allocateDirect(122784);
|
H A D | Dictionary.java | 9 import java.nio.ByteBuffer; 24 private static ByteBuffer data; 42 public static void setData(ByteBuffer data, int[] sizeBits) { in setData() 83 public static ByteBuffer getData() { in getData()
|