Searched refs:bytes (Results 1 - 25 of 77) sorted by relevance

1234

/frameworks/base/core/java/com/android/internal/http/multipart/
H A DByteArrayPartSource.java50 private byte[] bytes; field in class:ByteArrayPartSource
55 * @param fileName the name of the file these bytes represent
56 * @param bytes the content of this part
58 public ByteArrayPartSource(String fileName, byte[] bytes) { argument
61 this.bytes = bytes;
69 return bytes.length;
83 return new ByteArrayInputStream(bytes);
H A DMultipartEntity.java110 byte[] bytes = new byte[rand.nextInt(11) + 30]; // a random size from 30 to 40
111 for (int i = 0; i < bytes.length; i++) {
112 bytes[i] = MULTIPART_CHARS[rand.nextInt(MULTIPART_CHARS.length)];
114 return bytes;
/frameworks/base/voip/jni/rtp/
H A DAmrCodec.cpp102 unsigned char *bytes = (unsigned char *)payload; local
106 samples, bytes + 1, &type, AMR_TX_WMF);
113 bytes[0] = 0xF0;
114 bytes[1] = (mMode << 3) | 0x04;
118 bytes[0] = 0xFF;
119 bytes[1] = 0xC0 | (mMode << 1) | 1;
122 bytes[length + 1] = 0;
124 bytes[i] = (bytes[i] << 6) | (bytes[
133 unsigned char *bytes = (unsigned char *)payload; local
226 unsigned char *bytes = (unsigned char *)payload; local
244 unsigned char *bytes = (unsigned char *)payload; local
[all...]
/frameworks/base/core/java/com/google/android/mms/pdu/
H A DQuotedPrintable.java26 * Decodes an array quoted-printable characters into an array of original bytes.
35 * @param bytes array of quoted-printable characters
36 * @return array of original bytes,
39 public static final byte[] decodeQuotedPrintable(byte[] bytes) { argument
40 if (bytes == null) {
44 for (int i = 0; i < bytes.length; i++) {
45 int b = bytes[i];
48 if('\r' == (char)bytes[i + 1] &&
49 '\n' == (char)bytes[i + 2]) {
53 int u = Character.digit((char) bytes[
[all...]
/frameworks/base/cmds/keystore/
H A Dkeystore_cli.c47 uint8_t bytes[65536]; local
66 bytes[0] = length >> 8;
67 bytes[1] = length;
68 send(sock, &bytes, 2, 0);
78 while ((i = recv(sock, &bytes[0], 1, 0)) == 1) {
81 if ((i = recv(sock, &bytes[1], 1, 0)) != 1) {
85 length = bytes[0] << 8 | bytes[1];
87 i = recv(sock, &bytes[offset], length - offset, 0);
93 fwrite(bytes,
[all...]
H A Dkeystore_get.h38 * KEYSTORE_MESSAGE_SIZE bytes. This function returns the length of the value or
42 uint8_t bytes[2] = {length >> 8, length}; local
54 if (send(sock, &code, 1, 0) == 1 && send(sock, bytes, 2, 0) == 2 &&
57 recv(sock, &bytes[0], 1, 0) == 1 && recv(sock, &bytes[1], 1, 0) == 1) {
59 length = bytes[0] << 8 | bytes[1];
/frameworks/base/core/java/com/android/internal/util/
H A DCharSequences.java26 * bytes.
28 * @param bytes ASCII bytes
30 public static CharSequence forAsciiBytes(final byte[] bytes) { argument
33 return (char) bytes[index];
37 return bytes.length;
41 return forAsciiBytes(bytes, start, end);
45 return new String(bytes);
52 * bytes.
54 * @param bytes ASCI
61 forAsciiBytes(final byte[] bytes, final int start, final int end) argument
[all...]
H A DBitwiseInputStream.java96 int bytes = (bits >>> 3) + ((bits & 0x07) > 0 ? 1 : 0); // &7==%8
97 byte[] arr = new byte[bytes];
98 for (int i = 0; i < bytes; i++) {
/frameworks/base/libs/rs/
H A DrsLocklessFifo.h71 void * reserve(uint32_t bytes);
72 void commit(uint32_t command, uint32_t bytes);
73 void commitSync(uint32_t command, uint32_t bytes);
79 void makeSpace(uint32_t bytes);
H A DrsHandcode.h13 cmd->bytes = sizeBytes;
37 cmd->bytes = sizeBytes;
H A DrsLocklessFifo.cpp160 uint32_t bytes = reinterpret_cast<const uint16_t *>(mGet)[1]; local
161 mGet += ((bytes + 3) & ~3) + 4;
168 void LocklessCommandFifo::makeSpace(uint32_t bytes) argument
171 if ((mPut+bytes) > mEnd) {
184 while(getFreeSpace() < bytes) {
/frameworks/base/core/tests/coretests/src/com/android/internal/util/
H A DCharSequencesTest.java29 byte[] bytes = s.getBytes();
31 String copy = toString(forAsciiBytes(bytes));
34 copy = toString(forAsciiBytes(bytes, 0, s.length()));
37 String crazy = toString(forAsciiBytes(bytes, 0, 5));
40 String a = toString(forAsciiBytes(bytes, 0, 3).subSequence(2, 3));
43 String empty = toString(forAsciiBytes(bytes, 0, 3).subSequence(3, 3));
/frameworks/base/core/java/android/util/
H A DBase64InputStream.java103 long bytes = Math.min(n, outputEnd-outputStart);
104 outputStart += bytes;
105 return bytes;
126 int bytes = Math.min(len, outputEnd-outputStart);
127 System.arraycopy(coder.output, outputStart, b, off, bytes);
128 outputStart += bytes;
129 return bytes;
/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteContentHelper.java79 byte[] bytes = cursor.getBlob(0);
80 if (bytes == null) {
83 MemoryFile file = new MemoryFile(null, bytes.length);
84 file.writeBytes(bytes, 0, 0, bytes.length);
/frameworks/base/tests/CoreTests/android/core/
H A DSha1Test.java56 private static String encodeHex(byte[] bytes) { argument
57 StringBuffer hex = new StringBuffer(bytes.length * 2);
59 for (int i = 0; i < bytes.length; i++) {
60 if (((int) bytes[i] & 0xff) < 0x10) {
63 hex.append(Integer.toString((int) bytes[i] & 0xff, 16));
H A DChecksumTest.java85 byte[] bytes = {1, 0, 5, 0, 15, 0, 1, 11, 0, 1};
87 adler.update(bytes);
90 for (int i = 0; i < bytes.length; i++) {
91 adler.update(bytes[i]);
H A DDatagramTest.java110 byte[] bytes = s.getBytes();
111 System.arraycopy(bytes, 0, packet.getData(), 0, bytes.length);
112 packet.setLength(bytes.length);
/frameworks/base/graphics/java/android/renderscript/
H A DBaseObj.java53 byte[] bytes = s.getBytes("UTF-8");
54 mRS.nAssignName(mID, bytes);
H A DRenderScriptGL.java117 byte[] bytes = s.getBytes("UTF-8");
118 int id = nFileOpen(bytes);
/frameworks/base/core/jni/
H A Dandroid_ddm_DdmHandleNativeHeap.cpp90 LOGD("**** read %d bytes from '%s'", (int) header.mapSize, path);
98 jbyte* bytes = NULL; local
105 bytes = env->GetByteArrayElements(array, NULL);
106 ptr = bytes;
120 env->ReleaseByteArrayElements(array, bytes, 0);
/frameworks/base/include/media/stagefright/
H A DMediaWriter.h41 virtual void setMaxFileSize(int64_t bytes) { mMaxFileSizeLimitBytes = bytes; } argument
/frameworks/base/services/audioflinger/
H A DAudioDumpInterface.cpp279 ssize_t AudioStreamOutDump::write(const void* buffer, size_t bytes) argument
284 ret = mFinalStream->write(buffer, bytes);
286 usleep((((bytes * 1000) / frameSize()) / sampleRate()) * 1000);
287 ret = bytes;
298 fwrite(buffer, bytes, 1, mFile);
439 ssize_t AudioStreamInDump::read(void* buffer, ssize_t bytes) argument
444 ret = mFinalStream->read(buffer, bytes);
454 fwrite(buffer, bytes, 1, mFile);
457 usleep((((bytes * 1000) / frameSize()) / sampleRate()) * 1000);
458 ret = bytes;
[all...]
H A DAudioHardwareStub.cpp128 ssize_t AudioStreamOutStub::write(const void* buffer, size_t bytes) argument
131 usleep(bytes * 1000000 / sizeof(int16_t) / AudioSystem::popCount(channels()) / sampleRate());
132 return bytes;
174 ssize_t AudioStreamInStub::read(void* buffer, ssize_t bytes) argument
177 usleep(bytes * 1000000 / sizeof(int16_t) / AudioSystem::popCount(channels()) / sampleRate());
178 memset(buffer, 0, bytes);
179 return bytes;
/frameworks/base/core/java/android/content/pm/
H A DSignature.java113 byte[] bytes = new byte[mSignature.length];
114 System.arraycopy(mSignature, 0, bytes, 0, mSignature.length);
115 return bytes;
/frameworks/base/services/java/com/android/server/
H A DLightsService.java163 byte[] bytes = new byte[2];
164 bytes[0] = (byte)(on ? '1' : '0');
165 bytes[1] = '\n';
166 fos.write(bytes);

Completed in 345 milliseconds

1234