/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/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/suggest/policyimpl/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/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/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/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, int *const pos) argument 175 readStringAndAdvancePosition(const uint8_t *const buffer, const int maxLength, int *const outBuffer, int *const pos) argument 187 advancePositionToBehindString( const uint8_t *const buffer, const int maxLength, int *const pos) argument 201 writeCodePointsAndAdvancePosition(uint8_t *const buffer, const int *const codePoints, const int codePointCount, const bool writesTerminator, int *const pos) argument 252 writeUint32AndAdvancePosition(uint8_t *const buffer, const uint32_t data, int *const pos) argument 260 writeUint24AndAdvancePosition(uint8_t *const buffer, const uint32_t data, int *const pos) argument 267 writeUint16AndAdvancePosition(uint8_t *const buffer, const uint16_t data, int *const pos) argument 273 writeUint8AndAdvancePosition(uint8_t *const buffer, const uint8_t data, int *const pos) argument [all...] |
H A D | dict_file_writing_utils.cpp | 37 // 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/tests/suggest/policyimpl/dictionary/utils/ |
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...] |
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/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, pos); 69 /* static */ int PtReadingUtils::getCharsAndAdvancePosition(const uint8_t *const buffer, argument 73 length = ByteArrayUtils::readStringAndAdvancePosition(buffer, maxLength, outBuffer, 76 const int codePoint = getCodePointAndAdvancePosition(buffer, po 47 getPtNodeArraySizeAndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 58 getFlagsAndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 94 skipCharacters(const uint8_t *const buffer, const NodeFlags flags, const int maxLength, int *const pos) argument 108 readProbabilityAndAdvancePosition(const uint8_t *const buffer, int *const pos) argument 113 readChildrenPositionAndAdvancePosition( const uint8_t *const buffer, const NodeFlags flags, int *const pos) argument [all...] |
H A D | dynamic_pt_reading_utils.cpp | 36 /* static */ int DynamicPtReadingUtils::getForwardLinkPosition(const uint8_t *const buffer, argument 39 return ByteArrayUtils::readSint24AndAdvancePosition(buffer, &linkAddressPos); 43 const uint8_t *const buffer, int *const pos) { 44 return ByteArrayUtils::readSint24AndAdvancePosition(buffer, pos); 59 const uint8_t *const buffer, int *const pos) { 61 const int offset = ByteArrayUtils::readSint24AndAdvancePosition(buffer, pos); 42 getParentPtNodePosOffsetAndAdvancePosition( const uint8_t *const buffer, int *const pos) argument 58 readChildrenPositionAndAdvancePosition( const uint8_t *const buffer, int *const pos) argument
|
/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/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/OMA-DM/engine/dmlib/dmengine/oma_toolkit/hdr/ |
H A D | md5.h | 51 unsigned char buffer[64]; /* input buffer */ member in struct:__anon95
|
/packages/apps/OMA-DM/engine/dmlib/dmengine/oma_toolkit/sml/xpt/hdr/ |
H A D | md5.h | 41 unsigned char buffer[64]; /* input buffer */ member in struct:__anon121
|
/packages/apps/OMA-DM/engine/dmlib/tool-src/servercred/hdr/ |
H A D | md5.h | 41 unsigned char buffer[64]; /* input buffer */ member in struct:__anon157
|
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/ |
H A D | FakeInputStream.java | 44 public int read(byte[] buffer, int offset, int length) { argument 45 Arrays.checkOffsetAndCount(buffer.length, offset, length);
|
/packages/apps/Mms/src/com/android/mms/util/ |
H A D | ImageCacheService.java | 76 ByteBuffer buffer = ByteBuffer.allocate(key.length + value.length); 77 buffer.put(key); 78 buffer.put(value); 81 mCache.insert(cacheKey, buffer.array()); 96 private static boolean isSameKey(byte[] key, byte[] buffer) { argument 98 if (buffer.length < n) { 102 if (key[i] != buffer[i]) { 135 public static final long crc64Long(byte[] buffer) { argument 137 for (int k = 0, n = buffer.length; k < n; ++k) { 138 crc = sCrcTable[(((int) crc) ^ buffer[ [all...] |
/packages/apps/ContactsCommon/tests/src/com/android/contacts/common/format/ |
H A D | FormatUtilsTests.java | 46 // This requires a resize of the actual buffer. 58 CharArrayBuffer buffer = new CharArrayBuffer(20); 59 FormatUtils.copyToCharArrayBuffer(text, buffer); 60 assertEquals(text, FormatUtils.charArrayBufferToString(buffer)); 64 * Checks that copying into the char array buffer copies the values correctly. 66 private void checkCopyToCharArrayBuffer(CharArrayBuffer buffer, String value, int length) { argument 67 FormatUtils.copyToCharArrayBuffer(value, buffer); 68 assertEquals(length, buffer.sizeCopied); 70 assertEquals(value.charAt(index), buffer.data[index]);
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/jpegstream/ |
H A D | JPEGOutputStream.java | 80 public void write(byte[] buffer, int offset, int length) throws IOException { argument 81 if (offset < 0 || length < 0 || (offset + length) > buffer.length) { 83 " buffer length %d, offset %d, length %d", 84 buffer.length, offset, length)); 104 returnCode = writeInputBytes(buffer, offset, length); 116 public void write(byte[] buffer) throws IOException { argument 117 write(buffer, 0, buffer.length);
|
/packages/apps/OMA-DM/engine/dmlib/dmengine/dm_persist/hdr/ |
H A D | SyncML_DM_FileHandle.H | 47 /* Frees the internal buffer */ 53 /* Reads count bytes into buffer */ 54 inline SYNCML_DM_RET_STATUS_T read(UINT8* buffer, UINT16 count) {return read((char*)( buffer ), count);} argument 55 SYNCML_DM_RET_STATUS_T read(char* buffer, UINT16 count); 57 /* Writes count bytes into the buffer/file 59 * adds small writes to a buffer before sending to the 61 inline SYNCML_DM_RET_STATUS_T write(const UINT8* buffer, UINT16 count) {return write((const char*)( buffer ), count);} argument 62 SYNCML_DM_RET_STATUS_T write(const char* buffer, UINT1 [all...] |