/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/ |
H A D | ver4_patricia_trie_reading_utils.cpp | 24 const uint8_t *const buffer, int *pos) { 25 return ByteArrayUtils::readUint32AndAdvancePosition(buffer, pos); 23 getTerminalIdAndAdvancePosition( const uint8_t *const buffer, int *pos) argument
|
H A D | ver4_pt_node_array_reader.h | 29 Ver4PtNodeArrayReader(const BufferWithExtendableBuffer *const buffer) : mBuffer(buffer) {}; argument
|
H A D | ver4_patricia_trie_reading_utils.h | 30 static int getTerminalIdAndAdvancePosition(const uint8_t *const buffer,
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/ |
H A D | ver4_patricia_trie_reading_utils.cpp | 33 const uint8_t *const buffer, int *pos) { 34 return ByteArrayUtils::readUint32AndAdvancePosition(buffer, pos); 32 getTerminalIdAndAdvancePosition( const uint8_t *const buffer, int *pos) argument
|
H A D | ver4_pt_node_array_reader.h | 42 Ver4PtNodeArrayReader(const BufferWithExtendableBuffer *const buffer) : mBuffer(buffer) {}; argument
|
/packages/inputmethods/LatinIME/native/jni/tests/dictionary/utils/ |
H A D | format_utils_test.cpp | 34 std::vector<uint8_t> buffer; local 35 buffer.push_back(magicNumber >> 24); 36 buffer.push_back(magicNumber >> 16); 37 buffer.push_back(magicNumber >> 8); 38 buffer.push_back(magicNumber); 40 buffer.push_back(version >> 8); 41 buffer.push_back(version); 43 buffer.push_back(flags >> 8); 44 buffer.push_back(flags); 46 buffer 58 const std::vector<uint8_t> buffer = local 64 const std::vector<uint8_t> buffer = local 70 const std::vector<uint8_t> buffer = local 77 const std::vector<uint8_t> buffer = local 83 const std::vector<uint8_t> buffer = local 89 const std::vector<uint8_t> buffer = local [all...] |
H A D | buffer_with_extendable_buffer_test.cpp | 27 BufferWithExtendableBuffer buffer(DEFAULT_MAX_BUFFER_SIZE); 31 EXPECT_TRUE(buffer.writeUint(data_1, 1 /* size */, pos)); 32 EXPECT_EQ(data_1, buffer.readUint(1, pos)); 36 EXPECT_TRUE(buffer.writeUint(data_2, 2 /* size */, pos)); 37 EXPECT_EQ(data_2, buffer.readUint(2, pos)); 41 EXPECT_TRUE(buffer.writeUint(data_3, 3 /* size */, pos)); 42 EXPECT_EQ(data_3, buffer.readUint(3, pos)); 46 EXPECT_TRUE(buffer.writeUint(data_4, 4 /* size */, pos)); 47 EXPECT_EQ(data_4, buffer.readUint(4, pos)); 51 BufferWithExtendableBuffer buffer(DEFAULT_MAX_BUFFER_SIZ [all...] |
H A D | byte_array_utils_test.cpp | 28 const uint8_t buffer[] = { 0x20u, 0x21u, 0x00u, 0x01u, 0x00u }; local 31 EXPECT_EQ(0x6f, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); 33 EXPECT_EQ(0x6b, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); 34 // Expect the original code point from buffer[2] to buffer[4], 0x100 36 EXPECT_EQ(0x100, ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, &pos)); 40 const uint8_t buffer[] = { 0x1u, 0x8Au, 0x0u, 0xAAu }; local 42 EXPECT_EQ(0x01u, ByteArrayUtils::readUint8(buffer, 0)); 43 EXPECT_EQ(0x8Au, ByteArrayUtils::readUint8(buffer, 1)); 44 EXPECT_EQ(0x0u, ByteArrayUtils::readUint8(buffer, 60 uint8_t buffer[4]; local 74 const uint8_t buffer[] = { 0x10, 0xFF, 0x00u, 0x20u, 0x41u, 0x1Fu, 0x60 }; local 92 uint8_t buffer[10]; local [all...] |
/packages/apps/UnifiedEmail/src/org/apache/james/mime4j/decoder/ |
H A D | UnboundedFifoByteBuffer.java | 26 * UnboundedFifoByteBuffer is a very efficient buffer implementation. 44 * This buffer prevents null objects from being added. 57 protected byte[] buffer; field in class:UnboundedFifoByteBuffer 77 * @param initialSize the initial size of the buffer 84 buffer = new byte[initialSize + 1]; 90 * Returns the number of elements stored in the buffer. 92 * @return this buffer's size 98 size = buffer.length - head + tail; 107 * Returns true if this buffer is empty; false otherwise. 109 * @return true if this buffer i [all...] |
/packages/services/Telephony/src/org/apache/james/mime4j/decoder/ |
H A D | UnboundedFifoByteBuffer.java | 26 * UnboundedFifoByteBuffer is a very efficient buffer implementation. 44 * This buffer prevents null objects from being added. 57 protected byte[] buffer; field in class:UnboundedFifoByteBuffer 77 * @param initialSize the initial size of the buffer 84 buffer = new byte[initialSize + 1]; 90 * Returns the number of elements stored in the buffer. 92 * @return this buffer's size 98 size = buffer.length - head + tail; 107 * Returns true if this buffer is empty; false otherwise. 109 * @return true if this buffer i [all...] |
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
H A D | byte_array_utils.h | 36 static AK_FORCE_INLINE void writeUintAndAdvancePosition(uint8_t *const buffer, argument 42 ByteArrayUtils::writeUint8AndAdvancePosition(buffer, data, pos); 45 ByteArrayUtils::writeUint16AndAdvancePosition(buffer, data, pos); 48 ByteArrayUtils::writeUint24AndAdvancePosition(buffer, data, pos); 51 ByteArrayUtils::writeUint32AndAdvancePosition(buffer, data, pos); 63 static AK_FORCE_INLINE uint32_t readUint32(const uint8_t *const buffer, const int pos) { argument 64 return (buffer[pos] << 24) ^ (buffer[pos + 1] << 16) 65 ^ (buffer[pos + 2] << 8) ^ buffer[po 68 readUint24(const uint8_t *const buffer, const int pos) argument 72 readUint16(const uint8_t *const buffer, const int pos) argument 76 readUint8(const uint8_t *const buffer, const int pos) argument 80 readUint32AndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 87 readSint24AndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 98 readUint24AndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 105 readUint16AndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 112 readUint8AndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 117 readUint(const uint8_t *const buffer, const int size, const int pos) argument 148 readCodePoint(const uint8_t *const buffer, const int pos) argument 153 readCodePointAndAdvancePosition( const uint8_t *const buffer, const int *const codePointTable, int *const pos) argument 185 readStringAndAdvancePosition(const uint8_t *const buffer, const int maxLength, const int *const codePointTable, int *const outBuffer, int *const pos) argument 198 advancePositionToBehindString( const uint8_t *const buffer, const int maxLength, int *const pos) argument 212 writeCodePointsAndAdvancePosition(uint8_t *const buffer, const int *const codePoints, const int codePointCount, const bool writesTerminator, int *const pos) argument 263 writeUint32AndAdvancePosition(uint8_t *const buffer, const uint32_t data, int *const pos) argument 271 writeUint24AndAdvancePosition(uint8_t *const buffer, const uint32_t data, int *const pos) argument 278 writeUint16AndAdvancePosition(uint8_t *const buffer, const uint16_t data, int *const pos) argument 284 writeUint8AndAdvancePosition(uint8_t *const buffer, const uint8_t data, int *const pos) argument [all...] |
H A D | dict_file_writing_utils.cpp | 38 // Enough size to describe buffer size. 83 const char *const suffix, const BufferWithExtendableBuffer *const buffer) { 87 return flushBufferToFile(filePath, buffer); 91 const BufferWithExtendableBuffer *const buffer) { 94 ByteArrayUtils::writeUintAndAdvancePosition(bufferSize, buffer->getTailPosition(), 99 return writeBufferToFile(file, buffer); 103 const BufferWithExtendableBuffer *const buffer) { 116 if (!writeBufferToFile(file, buffer)) { 120 buffer->getTailPosition()); 130 const BufferWithExtendableBuffer *const buffer) { 82 flushBufferToFileWithSuffix(const char *const basePath, const char *const suffix, const BufferWithExtendableBuffer *const buffer) argument 90 writeBufferToFileTail(FILE *const file, const BufferWithExtendableBuffer *const buffer) argument 102 flushBufferToFile(const char *const filePath, const BufferWithExtendableBuffer *const buffer) argument 129 writeBufferToFile(FILE *const file, const BufferWithExtendableBuffer *const buffer) argument [all...] |
H A D | dict_file_writing_utils.h | 39 const BufferWithExtendableBuffer *const buffer); 42 const BufferWithExtendableBuffer *const buffer); 61 const BufferWithExtendableBuffer *const buffer); 64 const BufferWithExtendableBuffer *const buffer);
|
/packages/services/Telephony/common/src/com/android/services/telephony/common/ |
H A D | AudioMode.java | 37 StringBuffer buffer = new StringBuffer(); 39 listAppend(buffer, "EARPIECE"); 42 listAppend(buffer, "BLUETOOTH"); 45 listAppend(buffer, "WIRED_HEADSET"); 48 listAppend(buffer, "SPEAKER"); 51 return buffer.toString(); 54 private static void listAppend(StringBuffer buffer, String str) { argument 55 if (buffer.length() > 0) { 56 buffer.append(", "); 58 buffer [all...] |
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/shortcut/ |
H A D | shortcut_list_reading_utils.cpp | 34 ShortcutListReadingUtils::getFlagsAndForwardPointer(const ReadOnlyByteArrayView buffer, argument 36 return ByteArrayUtils::readUint8AndAdvancePosition(buffer.data(), pos); 40 const ReadOnlyByteArrayView buffer, int *const pos) { 42 return ByteArrayUtils::readUint16AndAdvancePosition(buffer.data(), pos) 46 /* static */ int ShortcutListReadingUtils::readShortcutTarget(const ReadOnlyByteArrayView buffer, argument 49 return ByteArrayUtils::readStringAndAdvancePosition(buffer.data(), maxLength, 39 getShortcutListSizeAndForwardPointer( const ReadOnlyByteArrayView buffer, int *const pos) argument
|
H A D | shortcut_list_reading_utils.h | 31 static ShortcutFlags getFlagsAndForwardPointer(const ReadOnlyByteArrayView buffer, 44 static int getShortcutListSizeAndForwardPointer(const ReadOnlyByteArrayView buffer, 51 static AK_FORCE_INLINE void skipShortcuts(const ReadOnlyByteArrayView buffer, int *const pos) { argument 52 const int shortcutListSize = getShortcutListSizeAndForwardPointer(buffer, pos); 60 static int readShortcutTarget(const ReadOnlyByteArrayView buffer, const int maxLength,
|
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/bigram/ |
H A D | bigram_list_read_write_utils.cpp | 42 const ReadOnlyByteArrayView buffer, BigramFlags *const outBigramFlags, 44 if (static_cast<int>(buffer.size()) <= *bigramEntryPos) { 46 "bigramEntryPos: %d.", buffer.size(), *bigramEntryPos); 49 const BigramFlags bigramFlags = ByteArrayUtils::readUint8AndAdvancePosition(buffer.data(), 54 const int targetPos = getBigramAddressAndAdvancePosition(buffer, bigramFlags, bigramEntryPos); 61 /* static */ bool BigramListReadWriteUtils::skipExistingBigrams(const ReadOnlyByteArrayView buffer, argument 65 if (!getBigramEntryPropertiesAndAdvancePosition(buffer, &flags, 0 /* outTargetPtNodePos */, 74 const ReadOnlyByteArrayView buffer, const BigramFlags flags, int *const pos) { 79 offset = ByteArrayUtils::readUint8AndAdvancePosition(buffer.data(), pos); 82 offset = ByteArrayUtils::readUint16AndAdvancePosition(buffer 41 getBigramEntryPropertiesAndAdvancePosition( const ReadOnlyByteArrayView buffer, BigramFlags *const outBigramFlags, int *const outTargetPtNodePos, int *const bigramEntryPos) argument 73 getBigramAddressAndAdvancePosition( const ReadOnlyByteArrayView buffer, const BigramFlags flags, int *const pos) argument [all...] |
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/pt_common/ |
H A D | dynamic_pt_writing_utils.h | 33 static bool writeEmptyDictionary(BufferWithExtendableBuffer *const buffer, const int rootPos); 36 BufferWithExtendableBuffer *const buffer, const int forwardLinkPos, 39 static bool writePtNodeArraySizeAndAdvancePosition(BufferWithExtendableBuffer *const buffer, 42 static bool writeFlags(BufferWithExtendableBuffer *const buffer, argument 46 return writeFlagsAndAdvancePosition(buffer, nodeFlags, &writingPos); 49 static bool writeFlagsAndAdvancePosition(BufferWithExtendableBuffer *const buffer, 53 static bool writeParentPosOffsetAndAdvancePosition(BufferWithExtendableBuffer *const buffer, 56 static bool writeCodePointsAndAdvancePosition(BufferWithExtendableBuffer *const buffer, 59 static bool writeChildrenPositionAndAdvancePosition(BufferWithExtendableBuffer *const buffer, 75 static bool writeDictOffset(BufferWithExtendableBuffer *const buffer, cons [all...] |
H A D | dynamic_pt_writing_utils.cpp | 39 BufferWithExtendableBuffer *const buffer, const int rootPos) { 41 if (!writePtNodeArraySizeAndAdvancePosition(buffer, 0 /* arraySize */, &writingPos)) { 44 return writeForwardLinkPositionAndAdvancePosition(buffer, NOT_A_DICT_POS /* forwardLinkPos */, 49 BufferWithExtendableBuffer *const buffer, const int forwardLinkPos, 51 return writeDictOffset(buffer, forwardLinkPos, (*forwardLinkFieldPos), forwardLinkFieldPos); 55 BufferWithExtendableBuffer *const buffer, const size_t arraySize, 61 return buffer->writeUintAndAdvancePosition(arraySize, SMALL_PTNODE_ARRAY_SIZE_FIELD_SIZE, 66 return buffer->writeUintAndAdvancePosition(data, LARGE_PTNODE_ARRAY_SIZE_FIELD_SIZE, 77 BufferWithExtendableBuffer *const buffer, 79 return buffer 38 writeEmptyDictionary( BufferWithExtendableBuffer *const buffer, const int rootPos) argument 48 writeForwardLinkPositionAndAdvancePosition( BufferWithExtendableBuffer *const buffer, const int forwardLinkPos, int *const forwardLinkFieldPos) argument 54 writePtNodeArraySizeAndAdvancePosition( BufferWithExtendableBuffer *const buffer, const size_t arraySize, int *const arraySizeFieldPos) argument 76 writeFlagsAndAdvancePosition( BufferWithExtendableBuffer *const buffer, const DynamicPtReadingUtils::NodeFlags nodeFlags, int *const nodeFlagsFieldPos) argument 83 writeParentPosOffsetAndAdvancePosition( BufferWithExtendableBuffer *const buffer, const int parentPos, const int basePos, int *const parentPosFieldPos) argument 89 writeCodePointsAndAdvancePosition( BufferWithExtendableBuffer *const buffer, const int *const codePoints, const int codePointCount, int *const codePointFieldPos) argument 103 writeChildrenPositionAndAdvancePosition( BufferWithExtendableBuffer *const buffer, const int childrenPosition, int *const childrenPositionFieldPos) argument 110 writeDictOffset(BufferWithExtendableBuffer *const buffer, const int targetPos, const int basePos, int *const offsetFieldPos) argument [all...] |
H A D | patricia_trie_reading_utils.cpp | 48 const uint8_t *const buffer, int *const pos) { 49 const uint8_t firstByte = ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); 54 buffer, pos); 59 const uint8_t *const buffer, int *const pos) { 60 return ByteArrayUtils::readUint8AndAdvancePosition(buffer, pos); 63 /* static */ int PtReadingUtils::getCodePointAndAdvancePosition(const uint8_t *const buffer, argument 65 return ByteArrayUtils::readCodePointAndAdvancePosition(buffer, codePointTable, pos); 69 /* static */ int PtReadingUtils::getCharsAndAdvancePosition(const uint8_t *const buffer, argument 74 length = ByteArrayUtils::readStringAndAdvancePosition(buffer, maxLength, codePointTable, 77 const int codePoint = getCodePointAndAdvancePosition(buffer, codePointTabl 47 getPtNodeArraySizeAndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 58 getFlagsAndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 95 skipCharacters(const uint8_t *const buffer, const NodeFlags flags, const int maxLength, const int *const codePointTable, int *const pos) argument 109 readProbabilityAndAdvancePosition(const uint8_t *const buffer, int *const pos) argument 114 readChildrenPositionAndAdvancePosition( const uint8_t *const buffer, const NodeFlags flags, int *const pos) argument [all...] |
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
H A D | ImageCacheService.java | 52 * The image data will be stored in <code>buffer.data</code>, started from 53 * <code>buffer.offset</code> for <code>buffer.length</code> bytes. If the 54 * buffer.data is not big enough, a new byte array will be allocated and returned. 58 public boolean getImageData(Path path, long timeModified, int type, BytesBuffer buffer) { argument 64 request.buffer = buffer.data; 68 if (isSameKey(key, request.buffer)) { 69 buffer.data = request.buffer; 111 isSameKey(byte[] key, byte[] buffer) argument [all...] |
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/ |
H A D | ver2_pt_node_array_reader.h | 30 Ver2PtNodeArrayReader(const ReadOnlyByteArrayView buffer) : mBuffer(buffer) {}; argument
|
/packages/apps/UnifiedEmail/src/org/apache/commons/io/ |
H A D | HexDump.java | 73 StringBuffer buffer = new StringBuffer(74); 81 dump(buffer, display_offset).append(' '); 84 dump(buffer, data[k + j]); 86 buffer.append(" "); 88 buffer.append(' '); 92 buffer.append((char) data[k + j]); 94 buffer.append('.'); 97 buffer.append(EOL); 98 stream.write(buffer.toString().getBytes()); 100 buffer [all...] |
/packages/apps/Messaging/src/android/support/v7/mms/pdu/ |
H A D | QuotedPrintable.java | 43 ByteArrayOutputStream buffer = new ByteArrayOutputStream(); 58 buffer.write((char) ((u << 4) + l)); 63 buffer.write(b); 66 return buffer.toByteArray();
|
/packages/apps/Messaging/src/com/android/messaging/mmslib/pdu/ |
H A D | QuotedPrintable.java | 43 ByteArrayOutputStream buffer = new ByteArrayOutputStream(); 58 buffer.write((char) ((u << 4) + l)); 63 buffer.write(b); 66 return buffer.toByteArray();
|