/libcore/luni/src/main/java/org/apache/harmony/luni/util/ |
D | FloatingPointParser.java | 94 private static StringExponentPair initialParse(String s, int length) { in initialParse() argument 101 if (length == 0) in initialParse() 104 c = s.charAt(length - 1); in initialParse() 106 length--; in initialParse() 107 if (length == 0) in initialParse() 113 if (end + 1 == length) in initialParse() 125 length)); in initialParse() 134 end = length; in initialParse() 136 if (length == 0) in initialParse() 142 --length; in initialParse() [all …]
|
/libcore/luni/src/main/java/java/io/ |
D | PushbackInputStream.java | 87 return buf.length - pos + in.available(); in available() 139 if (pos < buf.length) { in read() 174 public int read(byte[] buffer, int offset, int length) throws IOException { in read() argument 179 if (offset > buffer.length || offset < 0) { in read() 182 if (length < 0 || length > buffer.length - offset) { in read() 183 throw new ArrayIndexOutOfBoundsException("Length out of bounds: " + length); in read() 188 if (pos < buf.length) { in read() 189 copyLength = (buf.length - pos >= length) ? length : buf.length in read() 198 if (copyLength == length) { in read() 199 return length; in read() [all …]
|
D | BufferedOutputStream.java | 119 public synchronized void write(byte[] buffer, int offset, int length) throws IOException { in write() argument 127 if (length >= internalBuffer.length) { in write() 129 out.write(buffer, offset, length); in write() 133 if (offset < 0 || offset > buffer.length - length) { in write() 137 if (length < 0) { in write() 138 throw new ArrayIndexOutOfBoundsException("Length out of bounds: " + length); in write() 142 if (length >= (internalBuffer.length - count)) { in write() 147 System.arraycopy(buffer, offset, internalBuffer, count, length); in write() 148 count += length; in write() 178 if (count == buf.length) { in write()
|
D | ByteArrayInputStream.java | 58 this.count = buf.length; in ByteArrayInputStream() 73 public ByteArrayInputStream(byte[] buf, int offset, int length) { in ByteArrayInputStream() argument 80 count = offset + length > buf.length ? buf.length : offset + length; in ByteArrayInputStream() 167 public synchronized int read(byte[] buffer, int offset, int length) { in read() argument 180 if ((offset | length) < 0 || length > buffer.length - offset) { in read() 188 if (length == 0) { in read() 192 int copylen = this.count - pos < length ? this.count - pos : length; in read()
|
D | InputStream.java | 157 return read(b, 0, b.length); in read() 180 public int read(byte[] b, int offset, int length) throws IOException { in read() argument 185 if (offset > b.length || offset < 0) { in read() 188 if (length < 0 || length > b.length - offset) { in read() 189 throw new ArrayIndexOutOfBoundsException("Length out of bounds: " + length); in read() 191 for (int i = 0; i < length; i++) { in read() 205 return length; in read()
|
/libcore/luni/src/main/java/org/apache/harmony/xnet/provider/jsse/ |
D | ClientKeyExchange.java | 53 length = this.exchange_keys.length; in ClientKeyExchange() 55 length += 2; in ClientKeyExchange() 68 exchange_keys = new byte[bb.length-1]; in ClientKeyExchange() 69 System.arraycopy(bb, 1, exchange_keys, 0, exchange_keys.length); in ClientKeyExchange() 73 length = exchange_keys.length +2; in ClientKeyExchange() 83 length = 0; in ClientKeyExchange() 94 public ClientKeyExchange(HandshakeIODataStream in, int length, boolean isTLS, boolean isRSA) in ClientKeyExchange() argument 98 if (length == 0) { in ClientKeyExchange() 99 this.length = 0; in ClientKeyExchange() 104 size = length; in ClientKeyExchange() [all …]
|
D | CertificateMessage.java | 53 public CertificateMessage(HandshakeIODataStream in, int length) in CertificateMessage() argument 57 if (length != 3) { // no more bytes after total_length in CertificateMessage() 63 this.length = 3; in CertificateMessage() 88 for (int i = 0; i < certs.length; i++) { in CertificateMessage() 91 this.length = 3 + 3 * certs.length + enc_size; in CertificateMessage() 92 if (this.length != length) { in CertificateMessage() 108 length = 3; in CertificateMessage() 113 encoded_certs = new byte[certs.length][]; in CertificateMessage() 114 for (int i = 0; i < certs.length; i++) { in CertificateMessage() 123 length = 3 + 3 * encoded_certs.length; in CertificateMessage() [all …]
|
D | ServerKeyExchange.java | 70 length = 4 + bytes1.length + bytes2.length; in ServerKeyExchange() 72 length += 2 + hash.length; in ServerKeyExchange() 79 length += 2 + bytes3.length; in ServerKeyExchange() 93 byte[] noZero = new byte[bb.length - 1]; in toUnsignedByteArray() 94 System.arraycopy(bb, 1, noZero, 0, noZero.length); in toUnsignedByteArray() 108 public ServerKeyExchange(HandshakeIODataStream in, int length, in ServerKeyExchange() argument 114 this.length = 2 + bytes1.length; in ServerKeyExchange() 118 this.length += 2 + bytes2.length; in ServerKeyExchange() 123 this.length += 2 + bytes3.length; in ServerKeyExchange() 132 this.length += 2 + hash.length; in ServerKeyExchange() [all …]
|
D | ClientHello.java | 76 length = 38 + session_id.length + (this.cipher_suites.length << 1) in ClientHello() 77 + compression_methods.length; in ClientHello() 86 public ClientHello(HandshakeIODataStream in, int length) throws IOException { in ClientHello() argument 109 this.length = 38 + session_id.length + (cipher_suites.length << 1) in ClientHello() 110 + compression_methods.length; in ClientHello() 111 if (this.length > length) { in ClientHello() 116 if (this.length < length) { in ClientHello() 117 in.skip(length - this.length); in ClientHello() 118 this.length = length; in ClientHello() 146 for (int i = 0; i < cipher_suites.length; i++) { in ClientHello() [all …]
|
D | CertificateVerify.java | 40 if (hash == null || hash.length == 0) { in CertificateVerify() 45 length = hash.length + 2; in CertificateVerify() 55 public CertificateVerify(HandshakeIODataStream in, int length) in CertificateVerify() argument 57 if (length == 0) { in CertificateVerify() 61 if (in.readUint16() != length - 2) { in CertificateVerify() 65 signedHash = in.read(length -2); in CertificateVerify() 67 this.length = length; in CertificateVerify() 77 if (signedHash.length != 0) { in send() 78 out.writeUint16(signedHash.length); in send()
|
D | CertificateRequest.java | 79 certificate_authorities = new X500Principal[accepted.length]; in CertificateRequest() 80 encoded_principals = new byte[accepted.length][]; in CertificateRequest() 81 for (int i = 0; i < accepted.length; i++) { in CertificateRequest() 84 totalPrincipalsLength += encoded_principals[i].length + 2; in CertificateRequest() 87 length = 3 + certificate_types.length + totalPrincipalsLength; in CertificateRequest() 97 public CertificateRequest(HandshakeIODataStream in, int length) in CertificateRequest() argument 113 for (int i = 0; i < certificate_authorities.length; i++) { in CertificateRequest() 116 this.length = 3 + certificate_types.length + totalPrincipalsLength; in CertificateRequest() 117 if (this.length != length) { in CertificateRequest() 132 out.writeUint8(certificate_types.length); in send() [all …]
|
D | Finished.java | 40 length = data.length; in Finished() 49 public Finished(HandshakeIODataStream in, int length) in Finished() argument 51 if (length == 12 || length == 36) { in Finished() 52 data = in.read(length); in Finished() 53 length = data.length; in Finished()
|
/libcore/luni/src/main/java/java/net/ |
D | DatagramPacket.java | 35 int length; field in DatagramPacket 59 public DatagramPacket(byte[] data, int length) { in DatagramPacket() argument 60 this(data, 0, length); in DatagramPacket() 74 public DatagramPacket(byte[] data, int offset, int length) { in DatagramPacket() argument 76 setData(data, offset, length); in DatagramPacket() 96 public DatagramPacket(byte[] data, int offset, int length, in DatagramPacket() argument 98 this(data, offset, length); in DatagramPacket() 118 public DatagramPacket(byte[] data, int length, InetAddress host, int port) { in DatagramPacket() argument 119 this(data, 0, length, host, port); in DatagramPacket() 147 return length; in getLength() [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/ |
D | BerInputStream.java | 72 this(encoded, 0, encoded.length); in BerInputStream() 97 if (length != INDEFINIT_LENGTH in BerInputStream() 98 && (offset + expectedLength) != (this.offset + this.length)) { in BerInputStream() 129 if (length != INDEFINIT_LENGTH) { in BerInputStream() 132 if (buffer.length < (length + offset)) { in BerInputStream() 133 byte[] newBuffer = new byte[length + offset]; in BerInputStream() 163 protected int length; field in BerInputStream 195 length = read(); in next() 196 if (length != 0x80) { // definite form in next() 198 if ((length & 0x80) != 0) { // long form in next() [all …]
|
D | BerOutputStream.java | 47 public int length; field in BerOutputStream 61 if (length > 127) { //long form in encodeTag() 62 int eLen = length >> 8; in encodeTag() 71 eLen = length; in encodeTag() 78 encoded[offset++] = (byte) length; in encodeTag() 83 System.arraycopy(content, 0, encoded, offset, length); in encodeANY() 84 offset += length; in encodeANY() 91 System.arraycopy(bStr.bytes, 0, encoded, offset + 1, length - 1); in encodeBitString() 92 offset += length; in encodeBitString() 113 System.arraycopy(content, 0, encoded, offset, length); in encodeGeneralizedTime() [all …]
|
/libcore/luni/src/main/java/org/xml/sax/helpers/ |
D | AttributesImpl.java | 60 length = 0; in AttributesImpl() 93 return length; in getLength() 107 if (index >= 0 && index < length) { in getURI() 125 if (index >= 0 && index < length) { in getLocalName() 143 if (index >= 0 && index < length) { in getQName() 161 if (index >= 0 && index < length) { in getType() 178 if (index >= 0 && index < length) { in getValue() 201 int max = length * 5; in getIndex() 220 int max = length * 5; in getIndex() 242 int max = length * 5; in getType() [all …]
|
/libcore/luni/src/main/java/java/nio/charset/ |
D | CoderResult.java | 85 private final int length; field in CoderResult 95 private CoderResult(int type, int length) { in CoderResult() argument 98 this.length = length; in CoderResult() 112 public static synchronized CoderResult malformedForLength(int length) in malformedForLength() argument 114 if (length > 0) { in malformedForLength() 115 Integer key = Integer.valueOf(length); in malformedForLength() 119 r = new CoderResult(TYPE_MALFORMED_INPUT, length); in malformedForLength() 125 throw new IllegalArgumentException("Length must be greater than 0; was " + length); in malformedForLength() 140 public static synchronized CoderResult unmappableForLength(int length) in unmappableForLength() argument 142 if (length > 0) { in unmappableForLength() [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/archive/util/ |
D | Util.java | 37 int length = suffix.length(); in asciiEndsWithIgnoreCase() local 38 if (length > source.length()) { in asciiEndsWithIgnoreCase() 41 int offset = source.length() - length; in asciiEndsWithIgnoreCase() 42 for (int i = 0; i < length; i++) { in asciiEndsWithIgnoreCase() 69 if (buf1.length != buf2.length) { in asciiEqualsIgnoreCase() 73 for (int i = 0; i < buf1.length; i++) { in asciiEqualsIgnoreCase() 101 int length = s1.length(); in asciiEqualsIgnoreCase() local 102 if (length != s2.length()) { in asciiEqualsIgnoreCase() 106 for (int i = 0; i < length; i++) { in asciiEqualsIgnoreCase()
|
/libcore/luni/src/main/java/java/lang/ |
D | AbstractStringBuilder.java | 64 if (val.length < len) { in set() 85 count = string.length(); in AbstractStringBuilder() 94 int newCount = ((value.length >> 1) + value.length) + 2; in enlargeBuffer() 103 if (newCount > value.length) { in appendNull() 113 int newCount = count + chars.length; in append0() 114 if (newCount > value.length) { in append0() 117 System.arraycopy(chars, 0, value, count, chars.length); in append0() 121 final void append0(char[] chars, int offset, int length) { in append0() argument 123 if (offset > chars.length || offset < 0) { in append0() 126 if (length < 0 || chars.length - offset < length) { in append0() [all …]
|
/libcore/luni/src/main/java/javax/crypto/spec/ |
D | PBEKeySpec.java | 46 this.password = new char[password.length]; in PBEKeySpec() 47 System.arraycopy(password, 0, this.password, 0, password.length); in PBEKeySpec() 77 if (salt.length == 0) { in PBEKeySpec() 90 this.password = new char[password.length]; in PBEKeySpec() 91 System.arraycopy(password, 0, this.password, 0, password.length); in PBEKeySpec() 93 this.salt = new byte[salt.length]; in PBEKeySpec() 94 System.arraycopy(salt, 0, this.salt, 0, salt.length); in PBEKeySpec() 118 if (salt.length == 0) { in PBEKeySpec() 128 this.password = new char[password.length]; in PBEKeySpec() 129 System.arraycopy(password, 0, this.password, 0, password.length); in PBEKeySpec() [all …]
|
/libcore/luni/src/main/native/ |
D | cbigint.cpp | 113 simpleAddHighPrecision (uint64_t * arg1, int32_t length, uint64_t arg2) in simpleAddHighPrecision() argument 121 else if (length == 1) in simpleAddHighPrecision() 124 while (++arg1[index] == 0 && ++index < length); in simpleAddHighPrecision() 126 return index == length; in simpleAddHighPrecision() 193 static uint32_t simpleMultiplyHighPrecision(uint64_t* arg1, int32_t length, uint64_t arg2) { in simpleMultiplyHighPrecision() argument 210 while (++index < length); in simpleMultiplyHighPrecision() 216 simpleMultiplyAddHighPrecision (uint64_t * arg1, int32_t length, uint64_t arg2, in simpleMultiplyAddHighPrecision() argument 240 while (++index < length); in simpleMultiplyAddHighPrecision() 253 void simpleMultiplyAddHighPrecisionBigEndianFix(uint64_t* arg1, int32_t length, uint64_t arg2, uint… in simpleMultiplyAddHighPrecisionBigEndianFix() argument 269 } while (++index < length); in simpleMultiplyAddHighPrecisionBigEndianFix() [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/luni/platform/ |
D | OSFileSystem.java | 39 private final void validateLockArgs(int type, long start, long length) { in validateLockArgs() argument 51 if (length < 0) { in validateLockArgs() 56 private native int lockImpl(int fd, long start, long length, int type, boolean wait); in lockImpl() argument 65 public native long length(int fd); in length() method in OSFileSystem 67 public boolean lock(int fd, long start, long length, int type, boolean waitFlag) in lock() argument 70 validateLockArgs(type, start, length); in lock() 71 int result = lockImpl(fd, start, length, type, waitFlag); in lock() 75 private native void unlockImpl(int fd, long start, long length) throws IOException; in unlockImpl() argument 77 public void unlock(int fd, long start, long length) throws IOException { in unlock() argument 79 validateLockArgs(IFileSystem.SHARED_LOCK_TYPE, start, length); in unlock() [all …]
|
/libcore/luni/src/main/java/com/ibm/icu4jni/text/ |
D | CollationKey.java | 41 if (bytes == null || bytes.length == 0) { in compareTo() 42 if (rhsBytes == null || rhsBytes.length == 0) { in compareTo() 47 if (rhsBytes == null || rhsBytes.length == 0) { in compareTo() 52 int count = Math.min(bytes.length, rhsBytes.length); in compareTo() 63 if (bytes.length < rhsBytes.length) { in compareTo() 66 if (bytes.length > rhsBytes.length) { in compareTo() 101 if (bytes != null && bytes.length != 0) { in hashCode() 102 int len = bytes.length; in hashCode() 117 if (bytes == null || bytes.length == 0) { in toByteArray()
|
/libcore/luni/src/main/java/org/apache/xml/serializer/ |
D | ToTextStream.java | 195 public void characters(char ch[], int start, int length) in characters() argument 215 m_writer.write(ch, start, length); in characters() 219 writeNormalizedChars(ch, start, length, m_lineSepUse); in characters() 223 super.fireCharEvent(ch, start, length); in characters() 242 public void charactersRaw(char ch[], int start, int length) in charactersRaw() argument 248 writeNormalizedChars(ch, start, length, m_lineSepUse); in charactersRaw() 273 final int length, in writeNormalizedChars() argument 279 final int end = start + length; in writeNormalizedChars() 377 public void cdata(char ch[], int start, int length) in cdata() argument 382 writeNormalizedChars(ch, start, length, m_lineSepUse); in cdata() [all …]
|
/libcore/luni/src/main/java/java/util/ |
D | StringTokenizer.java | 176 for (int i = position, length = string.length(); i < length; i++) { in countTokens() 212 int length = string.length(); in hasMoreTokens() local 213 if (position < length) { in hasMoreTokens() 219 for (int i = position; i < length; i++) in hasMoreTokens() 250 int length = string.length(); in nextToken() local 252 if (i < length) { in nextToken() 256 for (position++; position < length; position++) in nextToken() 262 while (i < length && delimiters.indexOf(string.charAt(i), 0) >= 0) in nextToken() 265 if (i < length) { in nextToken() 266 for (position++; position < length; position++) in nextToken()
|