Searched refs:length (Results 1 - 25 of 3067) sorted by relevance

1234567891011>>

/frameworks/base/obex/javax/obex/
H A DPasswordAuthentication.java55 mUserName = new byte[userName.length];
56 System.arraycopy(userName, 0, mUserName, 0, userName.length);
59 mPassword = new byte[password.length];
60 System.arraycopy(password, 0, mPassword, 0, password.length);
H A DObexPacket.java28 private ObexPacket(int headerId, int length) { argument
30 mLength = length;
52 // Read the 2 byte length field from the stream
53 int length = is.read();
54 length = (length << 8) + is.read();
56 ObexPacket newPacket = new ObexPacket(headerId, length);
60 if (length > 3) {
62 temp = new byte[length - 3];
64 while (bytesReceived != temp.length) {
[all...]
H A DPrivateInputStream.java76 return mData.length - mIndex;
92 while (mData.length == mIndex) {
102 return read(b, 0, b.length);
106 public synchronized int read(byte[] b, int offset, int length) throws IOException { argument
111 if ((offset | length) < 0 || length > b.length - offset) {
116 int currentDataLength = mData.length - mIndex;
117 int remainReadLength = length;
131 currentDataLength = mData.length
[all...]
/frameworks/native/opengl/tools/glgen/stubs/gles11/
H A DglMapBufferRange.java1 // C function GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access )
10 int length,
7 glMapBufferRange( int target, int offset, int length, int access ) argument
H A DglGetShaderSource.java1 // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
6 int[] length,
12 // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
18 java.nio.IntBuffer length,
22 // C function void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
3 glGetShaderSource( int shader, int bufsize, int[] length, int lengthOffset, byte[] source, int sourceOffset ) argument
15 glGetShaderSource( int shader, int bufsize, java.nio.IntBuffer length, byte source ) argument
/frameworks/base/core/java/android/hardware/camera2/params/
H A DReprocessFormatsMap.java51 * The inner array always contains {@code [format, length, ...]} where ... has length elements.
64 * (missing output format length or too few output formats)
77 int left = entry.length;
78 for (int i = 0; i < entry.length; ) {
86 String.format("Input %x had no output format length listed", inputFormat));
89 final int length = entry[i];
93 for (int j = 0; j < length; ++j) {
98 if (length > 0) {
99 if (left < length) {
[all...]
/frameworks/base/telephony/java/android/telephony/
H A DJapanesePhoneNumberFormatter.java162 int length = text.length();
163 if (length > 3
166 } else if (length < 1 || text.charAt(0) != '0') {
170 CharSequence saved = text.subSequence(0, length);
174 while (i < text.length()) {
182 length = text.length();
187 while (i < length) {
190 text.replace(0, length, save
[all...]
/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DLimitedLengthInputStreamTest.java42 InputStream is = new LimitedLengthInputStream(mTestStream1, -1, TEST_STRING1.length);
53 fail("Should throw IOException on negative length");
74 fail("Should fail when offset + length is > Long.MAX_VALUE");
80 private void checkReadBytesWithOffsetAndLength_WithString1(int offset, int length) argument
82 byte[] temp = new byte[TEST_STRING1.length];
83 byte[] expected = new byte[length];
84 byte[] actual = new byte[length];
86 System.arraycopy(TEST_STRING1, offset, expected, 0, length);
88 InputStream is = new LimitedLengthInputStream(mTestStream1, offset, length);
89 assertEquals(length, i
131 checkReadBytes_WithString1(int offset, int length) argument
167 checkSingleByteRead_WithString1(int offset, int length) argument
[all...]
/frameworks/base/tools/layoutlib/create/src/com/android/tools/layoutlib/java/
H A DCharsets.java52 public static byte[] toAsciiBytes(char[] chars, int offset, int length) { argument
53 CharBuffer cb = CharBuffer.allocate(length);
54 cb.put(chars, offset, length);
62 public static byte[] toIsoLatin1Bytes(char[] chars, int offset, int length) { argument
63 CharBuffer cb = CharBuffer.allocate(length);
64 cb.put(chars, offset, length);
72 public static byte[] toUtf8Bytes(char[] chars, int offset, int length) { argument
73 CharBuffer cb = CharBuffer.allocate(length);
74 cb.put(chars, offset, length);
82 public static byte[] toBigEndianUtf16Bytes(char[] chars, int offset, int length) { argument
102 asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars) argument
121 isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars) argument
[all...]
/frameworks/base/core/java/com/android/internal/util/
H A DCharSequences.java36 public int length() {
37 return bytes.length;
59 * is greater than length(), or if start is greater than end
63 validate(start, end, bytes.length);
69 public int length() {
76 validate(newStart, newEnd, length());
81 return new String(bytes, start, length());
86 static void validate(int start, int end, int length) { argument
89 if (end > length) throw new IndexOutOfBoundsException();
97 if (a.length() !
[all...]
/frameworks/base/core/java/android/bluetooth/
H A DBluetoothInputStream.java69 * Reads at most {@code length} bytes from this stream and stores them in
77 * @param length
82 * if {@code offset < 0} or {@code length < 0}, or if
83 * {@code offset + length} is greater than the length of
89 public int read(byte[] b, int offset, int length) throws IOException { argument
93 if ((offset | length) < 0 || length > b.length - offset) {
94 throw new ArrayIndexOutOfBoundsException("invalid offset or length");
[all...]
/frameworks/base/wifi/java/android/net/wifi/aware/
H A DTlvBufferUtils.java98 mArrayLength = (array == null) ? 0 : array.length;
129 size += field.length;
165 * @param length Copy the specified number (length) of bytes from the
171 int length) {
172 checkLength(length);
173 addHeader(type, length);
174 if (length != 0) {
175 System.arraycopy(array, offset, mArray, mPosition, length);
177 mPosition += length;
170 putByteArray(int type, @Nullable byte[] array, int offset, int length) argument
297 addHeader(int type, int length) argument
330 public int length; field in class:TlvBufferUtils.TlvElement
344 TlvElement(int type, int length, @Nullable byte[] refArray, int offset) argument
[all...]
H A DWifiAwareUtils.java26 * Per spec: The Service Name is a UTF-8 encoded string from 1 to 255 bytes in length. The
36 if (serviceNameData.length < 1 || serviceNameData.length > 255) {
37 throw new IllegalArgumentException("Invalid service name length - must be between "
42 while (index < serviceNameData.length) {
/frameworks/base/core/java/android/database/
H A DMergeCursor.java47 for (int i = 0; i < mCursors.length; i++) {
58 int length = mCursors.length;
59 for (int i = 0 ; i < length ; i++) {
73 int length = mCursors.length;
74 for (int i = 0 ; i < length; i++) {
161 int length = mCursors.length;
162 for (int i = 0 ; i < length ;
[all...]
/frameworks/base/services/tests/servicestests/src/com/android/server/
H A DBootReceiverFixFsckFsStatTest.java55 doTestFsckFsStat(logs, 0x405, 5, 0, logs.length);
57 final String[] doubleLogs = new String[logs.length * 2];
58 System.arraycopy(logs, 0, doubleLogs, 0, logs.length);
59 System.arraycopy(logs, 0, doubleLogs, logs.length, logs.length);
60 doTestFsckFsStat(doubleLogs, 0x401, 1, 0, logs.length);
61 doTestFsckFsStat(doubleLogs, 0x402, 2, logs.length, logs.length * 2);
82 doTestFsckFsStat(logs, 0x405, 0x405, 0, logs.length);
103 doTestFsckFsStat(logs, 0x405, 0x405, 0, logs.length);
[all...]
/frameworks/native/libs/binder/
H A DIProcessInfoService.cpp31 virtual status_t getProcessStatesFromPids(size_t length, /*in*/ int32_t* pids, argument
36 data.writeInt32Array(length, pids);
37 data.writeInt32(length); // write length of output array, used by java AIDL stubs
43 if (static_cast<size_t>(replyLen) != length) {
46 if (replyLen > 0 && (err = reply.read(states, length * sizeof(*states))) != NO_ERROR) {
52 virtual status_t getProcessStatesAndOomScoresFromPids(size_t length, argument
57 data.writeInt32Array(length, pids);
58 // write length of output arrays, used by java AIDL stubs
59 data.writeInt32(length);
[all...]
/frameworks/base/libs/common_time/
H A Dcommon_time_server_packets.cpp42 if ((offset + sizeof(field_name)) > length) \
53 if ((offset + sizeof(field_name)) > length) \
79 uint32_t length) {
91 uint32_t length) {
104 uint32_t length) {
107 ret = serializeHeader(data, length);
112 length -= ret;
117 length);
121 length);
124 tmp =((SyncRequestPacket*)(this))->serializePacket(data, length);
78 serializeHeader(uint8_t* data, uint32_t length) argument
90 deserializeHeader(const uint8_t* data, uint32_t length) argument
103 serializePacket(uint8_t* data, uint32_t length) argument
143 deserializePacket( const uint8_t* data, uint32_t length, uint64_t expectedSyncGroupID) argument
184 serializePacket(uint8_t* data, uint32_t length) argument
194 deserializePacket(const uint8_t* data, uint32_t length) argument
206 serializePacket(uint8_t* data, uint32_t length) argument
216 deserializePacket(const uint8_t* data, uint32_t length) argument
228 serializePacket(uint8_t* data, uint32_t length) argument
237 deserializePacket(const uint8_t* data, uint32_t length) argument
246 serializePacket(uint8_t* data, uint32_t length) argument
258 deserializePacket(const uint8_t* data, uint32_t length) argument
270 serializePacket(uint8_t* data, uint32_t length) argument
280 deserializePacket(const uint8_t* data, uint32_t length) argument
[all...]
/frameworks/opt/bitmap/src/com/android/bitmap/util/
H A DExif.java35 * @param byteSize Recommended parameter declaring the length of the input stream. If you
62 has(jpeg, byteSize, offset + length - 1)
64 where length is a variable int (around 30KB above) read from the EXIF headers.
74 int length = 0;
106 // Get the length and check if it is reasonable.
107 length = pack(jpeg, offset, 2, false);
108 if (length < 2 || !has(jpeg, byteSize, offset + length - 1)) {
109 Log.e(TAG, "Invalid length");
114 if (marker == 0xE1 && length >
187 pack(final InputStreamBuffer bytes, int offset, int length, final boolean littleEndian) argument
[all...]
/frameworks/opt/photoviewer/src/com/android/ex/photo/util/
H A DExif.java30 * @param byteSize Recommended parameter declaring the length of the input stream. If you
57 has(jpeg, byteSize, offset + length - 1)
59 where length is a variable int (around 30KB above) read from the EXIF headers.
69 int length = 0;
101 // Get the length and check if it is reasonable.
102 length = pack(jpeg, offset, 2, false);
103 if (length < 2 || !has(jpeg, byteSize, offset + length - 1)) {
104 Log.e(TAG, "Invalid length");
109 if (marker == 0xE1 && length >
182 pack(final InputStreamBuffer bytes, int offset, int length, final boolean littleEndian) argument
[all...]
/frameworks/base/media/java/android/media/midi/
H A DMidiPortImpl.java59 * message byte array contains variable length MIDI message.
60 * messageSize is size of variable length MIDI message
70 int length = 0;
72 dest[length++] = PACKET_TYPE_DATA;
74 System.arraycopy(message, offset, dest, length, size);
75 length += size;
79 dest[length++] = (byte)timestamp;
83 return length;
115 // message length is total buffer length minu
[all...]
/frameworks/base/packages/Osu/src/com/android/hotspot2/asn1/
H A DAsn1Octets.java10 public Asn1Octets(int tag, Asn1Class asn1Class, int length, ByteBuffer data) { argument
11 super(tag, asn1Class, false, length);
12 mOctets = new byte[length];
17 public Asn1Octets(int tag, Asn1Class asn1Class, int length, ByteBuffer data, int bitResidual) { argument
18 super(tag, asn1Class, false, length);
19 mOctets = new byte[length - 1];
/frameworks/opt/net/voip/src/jni/rtp/
H A DAmrCodec.cpp55 int decode(int16_t *samples, int count, void *payload, int length);
105 int length = AMREncode(mEncoder, mSidSync, (Mode)mMode, local
108 if (type != mMode || length != (8 + gFrameBits[mMode] + 7) >> 3) {
115 ++length;
121 // Shift left 6 bits and update the length.
122 bytes[length + 1] = 0;
123 for (int i = 0; i <= length; ++i) {
126 length = (10 + gFrameBits[mMode] + 7) >> 3;
128 return length;
131 int AmrCodec::decode(int16_t *samples, int /* count */, void *payload, int length) argument
229 int length = AMREncode(mEncoder, mSidSync, MR122, local
242 decode(int16_t *samples, int count, void *payload, int length) argument
[all...]
/frameworks/support/compat/java/android/support/v4/database/
H A DDatabaseUtilsCompat.java50 if (originalValues == null || originalValues.length == 0) {
53 String[] result = new String[originalValues.length + newValues.length ];
54 System.arraycopy(originalValues, 0, result, 0, originalValues.length);
55 System.arraycopy(newValues, 0, result, originalValues.length, newValues.length);
/frameworks/base/core/java/android/view/textservice/
H A DSentenceSuggestionsInfo.java50 if (suggestionsInfos.length != offsets.length || offsets.length != lengths.length) {
53 final int infoSize = suggestionsInfos.length;
63 mOffsets = new int[mSuggestionsInfos.length];
65 mLengths = new int[mSuggestionsInfos.length];
77 final int infoSize = mSuggestionsInfos.length;
93 return mSuggestionsInfos.length;
101 if (i >= 0 && i < mSuggestionsInfos.length) {
[all...]
/frameworks/base/keystore/java/android/security/keystore/
H A DArrayUtils.java32 return ((array != null) && (array.length > 0)) ? array.clone() : array;
36 return ((array != null) && (array.length > 0)) ? array.clone() : array;
40 return concat(arr1, 0, (arr1 != null) ? arr1.length : 0,
41 arr2, 0, (arr2 != null) ? arr2.length : 0);
62 if ((offset == 0) && (len == arr.length)) {
71 if ((arr1 == null) || (arr1.length == 0)) {
73 } else if ((arr2 == null) || (arr2.length == 0)) {
76 int[] result = new int[arr1.length + arr2.length];
77 System.arraycopy(arr1, 0, result, 0, arr1.length);
[all...]

Completed in 3860 milliseconds

1234567891011>>