/libcore/benchmarks/src/benchmarks/regression/ |
H A D | StringLengthBenchmark.java | 21 int length = 0; 23 length = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".length(); 25 if (length != 51) throw new RuntimeException();
|
H A D | CharsetBenchmark.java | 23 private int length; field in class:CharsetBenchmark 42 byte[] bytes = makeBytes(makeString(length)); 49 byte[] bytes = makeBytes(makeString(length)); 51 new String(bytes, 0, bytes.length); 56 byte[] bytes = makeBytes(makeString(length)); 58 new String(bytes, 0, bytes.length, name); 63 String string = makeString(length); 69 private static String makeString(int length) { argument 70 StringBuilder result = new StringBuilder(length); 71 for (int i = 0; i < length; [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | Length.java | 29 * The Length interface defines the length of an object 34 * Gets the length of this object 37 * the length should be measured in bits. 39 * @return the length of this object 42 public int length(); method in interface:Length
|
H A D | BitArray.java | 41 private int length; field in class:BitArray 56 public BitArray(int length) throws IllegalArgumentException { argument 57 if (length < 0) { 58 throw new IllegalArgumentException("Negative length for BitArray"); 61 this.length = length; 63 repn = new byte[(length + BITS_PER_UNIT - 1)/BITS_PER_UNIT]; 72 * 8*a.length <= length. 74 public BitArray(int length, byt argument 156 public int length() { method in class:BitArray [all...] |
H A D | ByteArrayLexOrder.java | 55 for (int i = 0; i < bytes1.length && i < bytes2.length; i++) { 63 return bytes1.length - bytes2.length;
|
/libcore/ojluni/src/main/java/java/net/ |
H A D | DatagramPacket.java | 59 int length; field in class:DatagramPacket 66 * length <code>length</code>, specifying an offset into the buffer. 68 * The <code>length</code> argument must be less than or equal to 69 * <code>buf.length</code>. 73 * @param length the number of bytes to read. 77 public DatagramPacket(byte buf[], int offset, int length) { argument 78 setData(buf, offset, length); 85 * length <code>length</cod 93 DatagramPacket(byte buf[], int length) argument 113 DatagramPacket(byte buf[], int offset, int length, InetAddress address, int port) argument 136 DatagramPacket(byte buf[], int offset, int length, SocketAddress address) argument 154 DatagramPacket(byte buf[], int length, InetAddress address, int port) argument 172 DatagramPacket(byte buf[], int length, SocketAddress address) argument 258 setData(byte[] buf, int offset, int length) argument 287 setReceivedLength(int length) argument 381 setLength(int length) argument [all...] |
/libcore/dalvik/src/main/java/dalvik/system/ |
H A D | DalvikLogging.java | 38 int length = loggerName.length(); 39 if (length <= 23) { 44 return length - (lastPeriod + 1) <= 23 46 : loggerName.substring(loggerName.length() - 23);
|
/libcore/ojluni/src/main/java/java/io/ |
H A D | OptionalDataException.java | 35 * length field is set to the number of bytes of primitive data 41 * OptionalDataException's eof field is set to true, and the length field 53 * Create an <code>OptionalDataException</code> with a length. 57 length = len; 65 length = 0; 75 public int length; field in class:OptionalDataException
|
H A D | StringReader.java | 39 private int length; field in class:StringReader 50 this.length = s.length(); 70 if (next >= length) 91 if ((off < 0) || (off > cbuf.length) || (len < 0) || 92 ((off + len) > cbuf.length) || ((off + len) < 0)) { 97 if (next >= length) 99 int n = Math.min(length - next, len); 125 if (next >= length) 128 long n = Math.min(length [all...] |
/libcore/luni/src/main/java/libcore/util/ |
H A D | CharsetUtils.java | 29 public static native byte[] toAsciiBytes(String s, int offset, int length); argument 35 public static native byte[] toIsoLatin1Bytes(String s, int offset, int length); argument 41 public static native byte[] toUtf8Bytes(String s, int offset, int length); argument 47 public static byte[] toBigEndianUtf16Bytes(String s, int offset, int length) { argument 48 byte[] result = new byte[length * 2]; 49 int end = offset + length; 67 public static native void asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars); argument 76 public static native void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars); argument
|
/libcore/ojluni/src/main/java/sun/misc/ |
H A D | IOUtils.java | 40 * Read up to <code>length</code> of bytes from <code>in</code> 43 * @param length number of bytes to read, -1 or Integer.MAX_VALUE means 46 * bytes are read. Ignored when length is -1 or Integer.MAX_VALUE 50 public static byte[] readFully(InputStream is, int length, boolean readAll) argument 53 if (length == -1) length = Integer.MAX_VALUE; 55 while (pos < length) { 57 if (pos >= output.length) { // Only expand when there's no room 58 bytesToRead = Math.min(length - pos, output.length [all...] |
/libcore/luni/src/main/java/libcore/internal/ |
H A D | StringPool.java | 28 private static boolean contentEquals(String s, char[] chars, int start, int length) { argument 29 if (s.length() != length) { 32 for (int i = 0; i < length; i++) { 41 * Returns a string equal to {@code new String(array, start, length)}. 43 public String get(char[] array, int start, int length) { argument 46 for (int i = start; i < start + length; i++) { 53 int index = hashCode & (pool.length - 1); 56 if (pooled != null && contentEquals(pooled, array, start, length)) { 60 String result = new String(array, start, length); [all...] |
/libcore/ojluni/src/main/java/java/lang/ |
H A D | System.java | 345 * equal to the <code>length</code> argument. The components at 347 * <code>srcPos+length-1</code> in the source array are copied into 349 * <code>destPos+length-1</code>, respectively, of the destination 355 * <code>srcPos+length-1</code> were first copied to a temporary 356 * array with <code>length</code> components and then the contents of 358 * <code>destPos</code> through <code>destPos+length-1</code> of the 392 * <li>The <code>length</code> argument is negative. 393 * <li><code>srcPos+length</code> is greater than 394 * <code>src.length</code>, the length o 431 arraycopy(Object src, int srcPos, Object dest, int destPos, int length) argument 449 arraycopy(char[] src, int srcPos, char[] dst, int dstPos, int length) argument 487 arraycopyCharUnchecked(char[] src, int srcPos, char[] dst, int dstPos, int length) argument 502 arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int length) argument 540 arraycopyByteUnchecked(byte[] src, int srcPos, byte[] dst, int dstPos, int length) argument 555 arraycopy(short[] src, int srcPos, short[] dst, int dstPos, int length) argument 593 arraycopyShortUnchecked(short[] src, int srcPos, short[] dst, int dstPos, int length) argument 608 arraycopy(int[] src, int srcPos, int[] dst, int dstPos, int length) argument 646 arraycopyIntUnchecked(int[] src, int srcPos, int[] dst, int dstPos, int length) argument 661 arraycopy(long[] src, int srcPos, long[] dst, int dstPos, int length) argument 699 arraycopyLongUnchecked(long[] src, int srcPos, long[] dst, int dstPos, int length) argument 714 arraycopy(float[] src, int srcPos, float[] dst, int dstPos, int length) argument 752 arraycopyFloatUnchecked(float[] src, int srcPos, float[] dst, int dstPos, int length) argument 767 arraycopy(double[] src, int srcPos, double[] dst, int dstPos, int length) argument 805 arraycopyDoubleUnchecked(double[] src, int srcPos, double[] dst, int dstPos, int length) argument 820 arraycopy(boolean[] src, int srcPos, boolean[] dst, int dstPos, int length) argument 858 arraycopyBooleanUnchecked(boolean[] src, int srcPos, boolean[] dst, int dstPos, int length) argument [all...] |
H A D | CharSequence.java | 62 * Returns the length of this character sequence. The length is the number 67 int length(); method in interface:CharSequence 71 * to <tt>length() - 1</tt>. The first <code>char</code> value of the sequence is at 85 * <tt>length()</tt> 92 * ends with the <code>char</code> value at index <tt>end - 1</tt>. The length 104 * if <tt>end</tt> is greater than <tt>length()</tt>, 111 * order as this sequence. The length of the string will be the length of 135 return cur < length(); [all...] |
/libcore/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/ |
H A D | Chunk.java | 25 * The "offset" and "length" fields are present so handlers can over-allocate 35 public int offset, length; // position within "data" field in class:Chunk 45 public Chunk(int type, byte[] data, int offset, int length) { argument 49 this.length = length; 61 this.length = buf.position();
|
/libcore/benchmarks/src/benchmarks/ |
H A D | StringIterationBenchmark.java | 27 for (int i = 0; i < s.length(); ++i) { 36 for (int i = 0, length = s.length(); i < length; ++i) { 46 for (int i = 0, length = chars.length; i < length; ++i) {
|
/libcore/luni/src/main/java/org/xml/sax/helpers/ |
H A D | AttributesImpl.java | 61 length = 0; 95 return length; 109 if (index >= 0 && index < length) { 127 if (index >= 0 && index < length) { 145 if (index >= 0 && index < length) { 163 if (index >= 0 && index < length) { 180 if (index >= 0 && index < length) { 203 int max = length * 5; 222 int max = length * 5; 244 int max = length * 612 int length; field in class:AttributesImpl [all...] |
/libcore/dex/src/main/java/com/android/dex/ |
H A D | ClassData.java | 50 Field[] result = new Field[staticFields.length + instanceFields.length]; 51 System.arraycopy(staticFields, 0, result, 0, staticFields.length); 52 System.arraycopy(instanceFields, 0, result, staticFields.length, instanceFields.length); 57 Method[] result = new Method[directMethods.length + virtualMethods.length]; 58 System.arraycopy(directMethods, 0, result, 0, directMethods.length); 59 System.arraycopy(virtualMethods, 0, result, directMethods.length, virtualMethods.length); [all...] |
/libcore/ojluni/src/main/java/java/nio/charset/ |
H A D | CoderResult.java | 59 * <tt>true</tt> and whose {@link #length() length} method returns the length 61 * all malformed-input errors of a given length. </p></li> 67 * whose {@link #length() length} method returns the length of the input 69 * of this class for all unmappable-character errors of a given length. 97 private final int length; field in class:CoderResult 99 private CoderResult(int type, int length) { argument 174 public int length() { method in class:CoderResult 233 malformedForLength(int length) argument 249 unmappableForLength(int length) argument [all...] |
/libcore/support/src/test/java/org/apache/harmony/xnet/tests/support/ |
H A D | X509TrustManagerImpl.java | 12 if(ax509certificate == null || ax509certificate.length == 0) 13 throw new IllegalArgumentException("null or zero-length certificate chain"); 14 if(s == null || s.length() == 0) 15 throw new IllegalArgumentException("null or zero-length authentication type"); 17 for (int i = 0; i < ax509certificate.length; i++) { 27 if(ax509certificate == null || ax509certificate.length == 0) 28 throw new IllegalArgumentException("null or zero-length certificate chain"); 29 if(s == null || s.length() == 0) 30 throw new IllegalArgumentException("null or zero-length authentication type"); 32 for (int i = 0; i < ax509certificate.length; [all...] |
/libcore/luni/src/main/java/org/apache/harmony/security/ |
H A D | PrivateKeyImpl.java | 51 byte[] toReturn = new byte[encoding.length]; 52 System.arraycopy(encoding, 0, toReturn, 0, encoding.length); 62 this.encoding = new byte[encoding.length]; 63 System.arraycopy(encoding, 0, this.encoding, 0, encoding.length);
|
H A D | PublicKeyImpl.java | 56 byte[] result = new byte[encoding.length]; 57 System.arraycopy(encoding, 0, result, 0, encoding.length); 68 this.encoding = new byte[encoding.length]; 69 System.arraycopy(encoding, 0, this.encoding, 0, encoding.length);
|
/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | StringBuilderTest.java | 28 sb.deleteCharAt(sb.length() - 1); 56 sb.delete(sb.length() - 3, sb.length()); 71 sb.deleteCharAt(sb.length()); 89 sb.delete(sb.length(), sb.length() + 2); 90 sb.delete(sb.length(), sb.length()); 97 sb.delete(sb.length() + 2, sb.length() [all...] |
/libcore/luni/src/main/java/android/system/ |
H A D | UnixSocketAddress.java | 34 // 1) pathname: 0 < sun_path.length <= NAMED_PATH_LENGTH, sun_path[0] != 0. 36 // 3) abstract: 0 < sun_path.length <= NAMED_PATH_LENGTH, sun_path[0] == 0. 44 if (sun_path.length > NAMED_PATH_LENGTH) { 45 throw new IllegalArgumentException("sun_path exceeds the maximum length"); 48 if (sun_path.length == 0) { 51 this.sun_path = new byte[sun_path.length]; 52 System.arraycopy(sun_path, 0, this.sun_path, 0, sun_path.length); 62 byte[] path = new byte[nameBytes.length + 1]; 63 System.arraycopy(nameBytes, 0, path, 1, nameBytes.length); 73 byte[] path = new byte[pathNameBytes.length [all...] |
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | GZIPInputStreamTest.java | 63 6, 0, 4, 2, 4, 2, 4, 2, // 2 byte extra length + 6 byte extra. 98 assertEquals(data.length, totalSkipped); 104 final int length = HELLO_WORLD_GZIPPED.length; 105 byte[] data = new byte[length * 2]; 106 System.arraycopy(HELLO_WORLD_GZIPPED, 0, data, 0, length); 107 System.arraycopy(HELLO_WORLD_GZIPPED, 0, data, length, length); 114 final int length = HELLO_WORLD_GZIPPED.length; [all...] |