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

123

/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/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);
/frameworks/base/core/java/android/pim/vcard/
H A DVCardEntryConstructor.java177 byte[] bytes = new byte[byteBuffer.remaining()];
178 byteBuffer.get(bytes);
180 return new String(bytes, charsetForDecodedBytes);
251 byte[] bytes;
253 bytes = builder.toString().getBytes(mInputCharset);
256 bytes = builder.toString().getBytes();
260 bytes = QuotedPrintableCodec.decodeQuotedPrintable(bytes);
267 return new String(bytes, charsetForDecodedBytes);
270 return new String(bytes);
[all...]
/frameworks/base/core/tests/coretests/src/android/pim/vcard/
H A DVNodeBuilder.java180 byte[] bytes = new byte[byteBuffer.remaining()];
181 byteBuffer.get(bytes);
183 return new String(bytes, targetCharset);
239 byte[] bytes;
241 bytes = builder.toString().getBytes(mSourceCharset);
244 bytes = builder.toString().getBytes();
248 bytes = QuotedPrintableCodec.decodeQuotedPrintable(bytes);
255 return new String(bytes, targetCharset);
258 return new String(bytes);
[all...]
/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/awt/org/apache/harmony/awt/gl/color/
H A DNativeImageFormat.java43 * Samples other than 1 - 7 bytes and multiple of 8 bits are
366 int bytes = 1;
369 bytes = 1; break;
372 bytes = 2; break;
374 bytes = 4; break;
376 bytes = 0; break;
441 bytesSh(bytes) |
455 // Can we extract bytes?
476 int bytes = 0;
479 bytes
[all...]
/frameworks/base/libs/audioflinger/
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;
H A DAudioDumpInterface.cpp250 ssize_t AudioStreamOutDump::write(const void* buffer, size_t bytes) argument
255 ret = mFinalStream->write(buffer, bytes);
257 usleep((bytes * 1000000) / frameSize() / sampleRate());
258 ret = bytes;
269 fwrite(buffer, bytes, 1, mOutFile);
410 ssize_t AudioStreamInDump::read(void* buffer, ssize_t bytes) argument
413 return mFinalStream->read(buffer, bytes);
416 usleep((bytes * 1000000) / frameSize() / sampleRate());
449 ssize_t bytesRead = fread(buffer, bytes, 1, mInFile);
450 if (bytesRead != bytes) {
[all...]
/frameworks/base/core/java/android/content/pm/
H A DSignature.java109 byte[] bytes = new byte[mSignature.length];
110 System.arraycopy(mSignature, 0, bytes, 0, mSignature.length);
111 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 369 milliseconds

123