/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
D | ASCIICharsetEncoderTest.java | 139 CharBuffer in = CharBuffer.wrap("A"); in testInternalState() local 144 encoder.encode(in, out, false); in testInternalState() 145 in = CharBuffer.wrap("B"); in testInternalState() 146 encoder.encode(in, out, true); in testInternalState() 161 CharBuffer in = CharBuffer.wrap("A"); in testInternalState_Reset() local 163 newEncoder.encode(in, out, false); in testInternalState_Reset() 169 CharBuffer in = CharBuffer.wrap("A"); in testInternalState_Reset() local 171 newEncoder.encode(in, out, true); in testInternalState_Reset() 176 CharBuffer in = CharBuffer.wrap("A"); in testInternalState_Reset() local 178 newEncoder.encode(in, out, true); in testInternalState_Reset() [all …]
|
D | CharsetDecoderTest.java | 218 ByteBuffer in = getByteBuffer(); in implTestDecodeByteBuffer() local 219 out = decoder.decode(in); in implTestDecodeByteBuffer() 226 in = getByteBuffer().asReadOnlyBuffer(); in implTestDecodeByteBuffer() 227 out = decoder.decode(in); in implTestDecodeByteBuffer() 237 ByteBuffer in; in testDecodeByteBufferException() local 243 in = getMalformedByteBuffer(); in testDecodeByteBufferException() 244 if (in != null) { in testDecodeByteBufferException() 246 CharBuffer buffer = decoder.decode(in); in testDecodeByteBufferException() 253 in.rewind(); in testDecodeByteBufferException() 255 out = decoder.decode(in); in testDecodeByteBufferException() [all …]
|
D | CharsetEncoderTest.java | 282 CharBuffer in = CharBuffer.wrap("aaa"); in testFlushIllegalState() local 295 encoder.encode(in, out, true); in testFlushIllegalState() 304 encoder.encode(in, out, false); in testFlushIllegalState() 328 CharBuffer in = CharBuffer.wrap("aaa"); in testEncodeFacadeIllegalState() local 330 encoder.encode(in); in testEncodeFacadeIllegalState() 331 in.rewind(); in testEncodeFacadeIllegalState() 334 encoder.encode(in); in testEncodeFacadeIllegalState() 335 in.rewind(); in testEncodeFacadeIllegalState() 340 encoder.encode(in); in testEncodeFacadeIllegalState() 341 in.rewind(); in testEncodeFacadeIllegalState() [all …]
|
/libcore/luni/src/main/java/libcore/io/ |
D | Base64.java | 35 public static byte[] decode(byte[] in) { in decode() argument 36 return decode(in, in.length); in decode() 39 public static byte[] decode(byte[] in, int len) { in decode() argument 54 chr = in[len-1]; in decode() 75 chr = in[i]; in decode() 135 public static String encode(byte[] in) { in encode() argument 136 int length = (in.length + 2) * 4 / 3; in encode() 138 int index = 0, end = in.length - in.length % 3; in encode() 140 out[index++] = map[(in[i] & 0xff) >> 2]; in encode() 141 out[index++] = map[((in[i] & 0x03) << 4) | ((in[i+1] & 0xff) >> 4)]; in encode() [all …]
|
D | Streams.java | 39 public static int readSingleByte(InputStream in) throws IOException { in readSingleByte() argument 41 int result = in.read(buffer, 0, 1); in readSingleByte() 59 public static void readFully(InputStream in, byte[] dst) throws IOException { in readFully() argument 60 readFully(in, dst, 0, dst.length); in readFully() 69 …public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOExcep… in readFully() argument 73 if (in == null) { in readFully() 81 int bytesRead = in.read(dst, offset, byteCount); in readFully() 93 public static byte[] readFully(InputStream in) throws IOException { in readFully() argument 95 return readFullyNoClose(in); in readFully() 97 in.close(); in readFully() [all …]
|
D | StrictLineReader.java | 49 private final InputStream in; field in StrictLineReader 68 public StrictLineReader(InputStream in) { in StrictLineReader() argument 69 this(in, 8192); in StrictLineReader() 80 public StrictLineReader(InputStream in, int capacity) { in StrictLineReader() argument 81 this(in, capacity, StandardCharsets.US_ASCII); in StrictLineReader() 93 public StrictLineReader(InputStream in, Charset charset) { in StrictLineReader() argument 94 this(in, 8192, charset); in StrictLineReader() 108 public StrictLineReader(InputStream in, int capacity, Charset charset) { in StrictLineReader() argument 109 if (in == null) { in StrictLineReader() 122 this.in = in; in StrictLineReader() [all …]
|
/libcore/luni/src/main/java/java/io/ |
D | SequenceInputStream.java | 38 private InputStream in; field in SequenceInputStream 58 in = s1; in SequenceInputStream() 74 in = e.nextElement(); in SequenceInputStream() 75 if (in == null) { in SequenceInputStream() 83 if (e != null && in != null) { in available() 84 return in.available(); in available() 97 while (in != null) { in close() 109 if (in != null) { in nextStream() 110 in.close(); in nextStream() 113 in = e.nextElement(); in nextStream() [all …]
|
D | FilterReader.java | 35 protected Reader in; field in FilterReader 43 protected FilterReader(Reader in) { in FilterReader() argument 44 super(in); in FilterReader() 45 this.in = in; in FilterReader() 57 in.close(); in close() 80 in.mark(readlimit); in mark() 97 return in.markSupported(); in markSupported() 114 return in.read(); in read() 130 return in.read(buffer, offset, count); in read() 148 return in.ready(); in ready() [all …]
|
D | FilterInputStream.java | 35 protected volatile InputStream in; field in FilterInputStream 47 protected FilterInputStream(InputStream in) { in FilterInputStream() argument 48 this.in = in; in FilterInputStream() 53 return in.available(); in available() 64 in.close(); in close() 83 in.mark(readlimit); in mark() 99 return in.markSupported(); in markSupported() 114 return in.read(); in read() 118 return in.read(buffer, byteOffset, byteCount); in read() 134 in.reset(); in reset() [all …]
|
D | PipedReader.java | 61 private int in = -1; field in PipedReader 243 while (in == -1) { in read() 262 if (out >= in) { in read() 269 if (out == in) { in read() 271 in = -1; in read() 280 if (copyLength == count || in == -1) { in read() 286 copyLength = in - out > count - copyLength ? count - copyLength : in - out; in read() 289 if (out == in) { in read() 291 in = -1; in read() 319 return in != -1; in ready() [all …]
|
D | DataInputStream.java | 53 public DataInputStream(InputStream in) { in DataInputStream() argument 54 super(in); in DataInputStream() 63 return in.read(buffer, byteOffset, byteCount); in read() 67 int temp = in.read(); in readBoolean() 75 int temp = in.read(); in readByte() 99 Streams.readFully(in, dst, offset, byteCount); in readFully() 103 Streams.readFully(in, scratch, 0, SizeOf.INT); in readInt() 116 int nextByte = in.read(); in readLine() 125 ((PushbackInputStream) in).unread(nextByte); in readLine() 130 if (!(in.getClass() == PushbackInputStream.class)) { in readLine() [all …]
|
D | PipedInputStream.java | 61 protected int in = -1; field in PipedInputStream 142 if (buffer == null || in == -1) { in available() 145 return in <= out ? buffer.length - out + in : in - out; in available() 226 while (in == -1) { in read() 246 if (out == in) { in read() 248 in = -1; in read() 304 while (in == -1) { in read() 323 if (out >= in) { in read() 331 if (out == in) { in read() 333 in = -1; in read() [all …]
|
D | InputStreamReader.java | 39 private InputStream in; field in InputStreamReader 56 public InputStreamReader(InputStream in) { in InputStreamReader() argument 57 this(in, Charset.defaultCharset()); in InputStreamReader() 75 public InputStreamReader(InputStream in, final String charsetName) in InputStreamReader() argument 77 super(in); in InputStreamReader() 81 this.in = in; in InputStreamReader() 102 public InputStreamReader(InputStream in, CharsetDecoder dec) { in InputStreamReader() argument 103 super(in); in InputStreamReader() 105 this.in = in; in InputStreamReader() 119 public InputStreamReader(InputStream in, Charset charset) { in InputStreamReader() argument [all …]
|
/libcore/dex/src/main/java/com/android/dex/ |
D | EncodedValueReader.java | 45 protected final ByteInput in; field in EncodedValueReader 50 public EncodedValueReader(ByteInput in) { in EncodedValueReader() argument 51 this.in = in; in EncodedValueReader() 54 public EncodedValueReader(EncodedValue in) { in EncodedValueReader() argument 55 this(in.asByteInput()); in EncodedValueReader() 64 public EncodedValueReader(ByteInput in, int knownType) { in EncodedValueReader() argument 65 this.in = in; in EncodedValueReader() 69 public EncodedValueReader(EncodedValue in, int knownType) { in EncodedValueReader() argument 70 this(in.asByteInput(), knownType); in EncodedValueReader() 78 int argAndType = in.readByte() & 0xff; in peek() [all …]
|
/libcore/json/src/main/java/org/json/ |
D | JSONTokener.java | 65 private final String in; field in JSONTokener 78 public JSONTokener(String in) { in JSONTokener() argument 80 if (in != null && in.startsWith("\ufeff")) { in JSONTokener() 81 in = in.substring(1); in JSONTokener() 83 this.in = in; in JSONTokener() 116 while (pos < in.length()) { in nextCleanInternal() 117 int c = in.charAt(pos++); in nextCleanInternal() 126 if (pos == in.length()) { in nextCleanInternal() 130 char peek = in.charAt(pos); in nextCleanInternal() 135 int commentEnd = in.indexOf("*/", pos); in nextCleanInternal() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/zip/ |
D | DeflaterInputStreamTest.java | 32 InputStream in = new DeflaterInputStream(new ByteArrayInputStream(data)); in testReadByteByByte() local 35 assertEquals(1, in.available()); in testReadByteByByte() 37 while ((b = in.read()) != -1) { in testReadByteByByte() 40 assertEquals(0, in.available()); in testReadByteByByte() 44 in.close(); in testReadByteByByte() 46 in.available(); in testReadByteByByte() 53 java.io.InputStream in = new InflaterInputStream(new ByteArrayInputStream(bytes)); in inflate() local 57 while ((count = in.read(buffer)) != -1) { in inflate() 66 InputStream in = new DeflaterInputStream(new ByteArrayInputStream(data)); in testReadWithBuffer() local 68 assertEquals(1, in.available()); in testReadWithBuffer() [all …]
|
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/ |
D | ASN1Oid.java | 62 public Object decode(BerInputStream in) throws IOException { in decode() argument 63 in.readOID(); in decode() 65 if (in.isVerify) { in decode() 68 return getDecodedObject(in); in decode() 76 @Override public Object getDecodedObject(BerInputStream in) throws IOException { in getDecodedObject() argument 78 int oidElement = in.oidElement; in getDecodedObject() 81 int octet = in.buffer[in.contentOffset + i]; in getDecodedObject() 85 octet = in.buffer[in.contentOffset + i]; in getDecodedObject() 134 @Override public Object getDecodedObject(BerInputStream in) throws IOException { 138 int octet = in.buffer[in.contentOffset]; [all …]
|
D | ASN1BitString.java | 63 @Override public Object decode(BerInputStream in) throws IOException { in decode() argument 64 in.readBitString(); in decode() 66 if (in.isVerify) { in decode() 69 return getDecodedObject(in); in decode() 78 @Override public Object getDecodedObject(BerInputStream in) throws IOException { in getDecodedObject() argument 79 byte[] bytes = new byte[in.length - 1]; in getDecodedObject() 80 System.arraycopy(in.buffer, in.contentOffset + 1, bytes, 0, in getDecodedObject() 81 in.length - 1); in getDecodedObject() 82 return new BitString(bytes, in.buffer[in.contentOffset]); in getDecodedObject() 112 @Override public Object getDecodedObject(BerInputStream in) throws IOException { in getDecodedObject() argument [all …]
|
D | ASN1Enumerated.java | 63 public Object decode(BerInputStream in) throws IOException { in decode() argument 64 in.readEnumerated(); in decode() 66 if (in.isVerify) { in decode() 69 return getDecodedObject(in); in decode() 77 public Object getDecodedObject(BerInputStream in) throws IOException { in getDecodedObject() argument 78 return Arrays.copyOfRange(in.buffer, in.contentOffset, in.contentOffset + in.length); in getDecodedObject()
|
D | ASN1OctetString.java | 61 @Override public Object decode(BerInputStream in) throws IOException { in decode() argument 62 in.readOctetString(); in decode() 64 if (in.isVerify) { in decode() 67 return getDecodedObject(in); in decode() 75 @Override public Object getDecodedObject(BerInputStream in) throws IOException { in getDecodedObject() argument 76 return Arrays.copyOfRange(in.buffer, in.contentOffset, in.contentOffset + in.length); in getDecodedObject()
|
D | ASN1Explicit.java | 62 public Object decode(BerInputStream in) throws IOException { in decode() argument 63 if (constrId != in.tag) { in decode() 65 in.tagOffset + "]. Expected tag: " + Integer.toHexString(constrId) + ", " + in decode() 66 "but encountered tag " + Integer.toHexString(in.tag)); in decode() 68 in.next(); in decode() 70 in.content = type.decode(in); in decode() 72 if (in.isVerify) { in decode() 75 return getDecodedObject(in); in decode()
|
D | ASN1Any.java | 72 public Object decode(BerInputStream in) throws IOException { in decode() argument 74 in.readContent(); in decode() 76 if (in.isVerify) { in decode() 79 return getDecodedObject(in); in decode() 89 public Object getDecodedObject(BerInputStream in) throws IOException { in getDecodedObject() argument 90 byte[] bytesEncoded = new byte[in.offset - in.tagOffset]; in getDecodedObject() 91 System.arraycopy(in.buffer, in.tagOffset, bytesEncoded, 0, in getDecodedObject()
|
D | ASN1Implicit.java | 102 public Object decode(BerInputStream in) throws IOException { in decode() argument 103 if (!checkTag(in.tag)) { in decode() 106 "[" + in.tagOffset + "]. Expected tag: " + Integer.toHexString(id) + ", " + in decode() 107 "but got " + Integer.toHexString(in.tag)); in decode() 111 if (id == in.tag) { in decode() 112 in.tag = type.id; in decode() 114 in.tag = type.constrId; in decode() 116 in.content = type.decode(in); in decode() 118 if (in.isVerify) { in decode() 121 return getDecodedObject(in); in decode()
|
D | ASN1Integer.java | 62 public Object decode(BerInputStream in) throws IOException { in decode() argument 63 in.readInteger(); in decode() 65 if (in.isVerify) { in decode() 68 return getDecodedObject(in); in decode() 76 public Object getDecodedObject(BerInputStream in) throws IOException { in getDecodedObject() argument 77 byte[] bytesEncoded = new byte[in.length]; in getDecodedObject() 78 System.arraycopy(in.buffer, in.contentOffset, bytesEncoded, 0, in getDecodedObject() 79 in.length); in getDecodedObject()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | HostnameVerifierTest.java | 46 InputStream in; in testVerify() local 48 in = new ByteArrayInputStream(X509_FOO); in testVerify() 49 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 57 in = new ByteArrayInputStream(X509_HANAKO); in testVerify() 58 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 63 in = new ByteArrayInputStream(X509_FOO_BAR); in testVerify() 64 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 71 in = new ByteArrayInputStream(X509_FOO_BAR_HANAKO); in testVerify() 72 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify() 85 in = new ByteArrayInputStream(X509_NO_CNS_FOO); in testVerify() [all …]
|