/libcore/ojluni/src/main/java/java/io/ |
H A D | FilterReader.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 46 protected Reader in; field in class:FilterReader 51 * @param in a Reader object providing the underlying stream. 52 * @throws NullPointerException if <code>in</code> is <code>null</code> 54 protected FilterReader(Reader in) { argument 55 super(in); 56 this.in = in; [all...] |
H A D | FilterInputStream.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 50 protected volatile InputStream in; field in class:FilterInputStream 54 * by assigning the argument <code>in</code> 55 * to the field <code>this.in</code> so as 58 * @param in the underlying input stream, or <code>null</code> if 61 protected FilterInputStream(InputStream in) { argument 62 this.in = in; [all...] |
H A D | SequenceInputStream.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 48 InputStream in; field in class:SequenceInputStream 56 * the enumeration will be read, in order, 80 * will be read in order, first <code>s1</code> 102 * Continues reading in the next stream if an EOF is reached. 105 if (in != null) { 106 in.close(); 110 in [all...] |
H A D | PipedInputStream.java | 10 * by Oracle in the LICENSE file that accompanied this code. 12 * This code is distributed in the hope that it will be useful, but WITHOUT 15 * version 2 for more details (a copy is included in the LICENSE file that 83 * The index of the position in the circular buffer at which the 85 * piped output stream. <code>in<0</code> implies the buffer is empty, 86 * <code>in==out</code> implies the buffer is full 89 protected int in = -1; field in class:PipedInputStream 92 * The index of the position in the circular buffer at which the next 206 if (in == out) 208 if (in < [all...] |
H A D | InputStreamReader.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 50 * BufferedReader in 51 * = new BufferedReader(new InputStreamReader(System.in)); 69 * @param in An InputStream 71 public InputStreamReader(InputStream in) { argument 72 super(in); 74 sd = StreamDecoder.forInputStreamReader(in, this, (String)null); // ## check lock object 84 * @param in 94 InputStreamReader(InputStream in, String charsetName) argument 112 InputStreamReader(InputStream in, Charset cs) argument 128 InputStreamReader(InputStream in, CharsetDecoder dec) argument [all...] |
H A D | PipedReader.java | 10 * by Oracle in the LICENSE file that accompanied this code. 12 * This code is distributed in the hope that it will be useful, but WITHOUT 15 * version 2 for more details (a copy is included in the LICENSE file that 61 * The index of the position in the circular buffer at which the 63 * piped writer. <code>in<0</code> implies the buffer is empty, 64 * <code>in==out</code> implies the buffer is full 66 int in = -1; field in class:PipedReader 69 * The index of the position in the circular buffer at which the next 180 while (in == out) { 194 if (in < [all...] |
/libcore/support/src/test/java/libcore/tlswire/util/ |
H A D | IoUtils.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 24 public static int readUnsignedInt24(DataInput in) throws IOException { argument 25 return (in.readUnsignedByte() << 16) | in.readUnsignedShort(); 28 public static byte[] readTlsVariableLengthByteVector(DataInput in, int maxSizeBytes) argument 30 int sizeBytes = readTlsVariableLengthVectorSizeBytes(in, maxSizeBytes); 32 in.readFully(result); 36 public static int[] readTlsVariableLengthUnsignedShortVector(DataInput in, int maxSizeBytes) argument 38 int sizeBytes = readTlsVariableLengthVectorSizeBytes(in, maxSizeByte 47 readTlsVariableLengthVectorSizeBytes(DataInput in, int maxSizeBytes) argument [all...] |
/libcore/ojluni/src/main/java/java/util/zip/ |
H A D | GZIPInputStream.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 36 * This class implements a stream filter for reading compressed data in 68 * @param in the input stream 76 public GZIPInputStream(InputStream in, int size) throws IOException { argument 77 super(in, new Inflater(true), size); 80 readHeader(in); 85 * @param in the input stream 91 public GZIPInputStream(InputStream in) throw argument 250 readUInt(InputStream in) argument 258 readUShort(InputStream in) argument 266 readUByte(InputStream in) argument 285 skipBytes(InputStream in, int n) argument [all...] |
H A D | DeflaterInputStream.java | 10 * by Oracle in the LICENSE file that accompanied this code. 12 * This code is distributed in the hope that it will be useful, but WITHOUT 15 * version 2 for more details (a copy is included in the LICENSE file that 34 * Implements an input stream filter for compressing data in the "deflate" 65 if (in == null) { 74 * @param in input stream to read the uncompressed data to 75 * @throws NullPointerException if {@code in} is null 77 public DeflaterInputStream(InputStream in) { argument 78 this(in, new Deflater()); 86 * @param in inpu 90 DeflaterInputStream(InputStream in, Deflater defl) argument 104 DeflaterInputStream(InputStream in, Deflater defl, int bufLen) argument [all...] |
/libcore/json/src/main/java/org/json/ |
H A D | JSONTokener.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 65 private final String in; field in class:JSONTokener 74 * @param in JSON encoded string. Null is not permitted and will yield a 78 public JSONTokener(String in) { argument 80 if (in != null && in.startsWith("\ufeff")) { 81 in = in.substring(1); 83 this.in [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
H A D | ASCIICharsetEncoderTest.java | 5 * (the "License"); you may not use this file except in compliance with 10 * Unless required by applicable law or agreed to in writing, software 95 // We consume the entire input buffer because we're in an underflow 96 // state. We can't make a decision on whether the char in this buffer 139 CharBuffer in = CharBuffer.wrap("A"); 144 encoder.encode(in, out, false); 145 in = CharBuffer.wrap("B"); 146 encoder.encode(in, out, true); 161 CharBuffer in = CharBuffer.wrap("A"); 163 newEncoder.encode(in, ou [all...] |
H A D | CharsetDecoderTest.java | 5 * (the "License"); you may not use this file except in compliance with 10 * Unless required by applicable law or agreed to in writing, software 218 ByteBuffer in = getByteBuffer(); 219 out = decoder.decode(in); 226 in = getByteBuffer().asReadOnlyBuffer(); 227 out = decoder.decode(in); 237 ByteBuffer in; 243 in = getMalformedByteBuffer(); 244 if (in != null) { 246 CharBuffer buffer = decoder.decode(in); 308 implTestDecodeByteBufferCharBuffer(ByteBuffer in) argument 403 implTestDecodeCharBufferByteBufferUnmappedException(ByteBuffer in, boolean endOfInput) argument 457 implTestDecodeCharBufferByteBufferMalformedException(ByteBuffer in, boolean endOfInput) argument 509 implTestDecodeCharBufferByteBufferException(ByteBuffer in, boolean endOfInput) argument 799 decodeLoop(ByteBuffer in, CharBuffer out) argument [all...] |
H A D | CharsetEncoderTest.java | 5 * (the "License"); you may not use this file except in compliance with 10 * Unless required by applicable law or agreed to in writing, software 282 CharBuffer in = CharBuffer.wrap("aaa"); 295 encoder.encode(in, out, true); 304 encoder.encode(in, out, false); 327 // encode facade can be execute in anywhere 328 CharBuffer in = CharBuffer.wrap("aaa"); 330 encoder.encode(in); 331 in.rewind(); 334 encoder.encode(in); 898 assertCodingErrorAction(boolean endOfInput, ByteBuffer out, CharBuffer in, byte[] expect) argument 1046 encodeLoop(CharBuffer in, ByteBuffer out) argument [all...] |
/libcore/luni/src/test/java/libcore/java/util/zip/ |
H A D | DeflaterInputStreamTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 37 InputStream in = new DeflaterInputStream(new ByteArrayInputStream(data)); 40 assertEquals(1, in.available()); 42 while ((b = in.read()) != -1) { 45 assertEquals(0, in.available()); 49 in.close(); 51 in.available(); 58 try (InputStream in = new InflaterInputStream(new ByteArrayInputStream(bytes))) { 62 while ((count = in [all...] |
/libcore/support/src/test/java/libcore/tlswire/record/ |
H A D | TlsRecord.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 31 public static TlsRecord read(DataInput in) throws IOException { argument 33 result.type = in.readUnsignedByte(); 34 result.version = TlsProtocolVersion.read(in); 35 int fragmentLength = in.readUnsignedShort(); 37 in.readFully(result.fragment);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | ClassNotFoundExceptionTest.java | 6 * (the "License"); you may not use this file except in compliance with 11 * Unless required by applicable law or agreed to in writing, software 26 * Thrown when an application tries to load in a class through its string 27 * name using the forName method in class Class. 53 IOException in = new IOException(); 54 ClassNotFoundException e = new ClassNotFoundException("SomeMessage", in); 55 assertEquals("Wrong Exception", in, e.getException()); 57 assertEquals("Wrong cause", in, e.getCause());
|
/libcore/ojluni/src/main/java/java/time/chrono/ |
H A D | Ser.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 31 * Redistribution and use in source and binary forms, with or without 37 * * Redistributions in binary form must reproduce the above copyright notice, 38 * this list of conditions and the following disclaimer in the documentation 74 * byte flag would be used in order to specify an alternative version of the type format. 78 * the serialization is performed. In order to deserialize the object it read in the type byte, switching 79 * in order to select which class to call back into. 82 * of the fields is written out with an appropriate size format in descendin 222 readExternal(ObjectInput in) argument 227 read(ObjectInput in) argument 232 readInternal(byte type, ObjectInput in) argument [all...] |
/libcore/luni/src/main/java/libcore/io/ |
H A D | Streams.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 35 * Implements InputStream.read(int) in terms of InputStream.read(byte[], int, int). 39 public static int readSingleByte(InputStream in) throws IOException { argument 41 int result = in.read(buffer, 0, 1); 46 * Implements OutputStream.write(int) in terms of OutputStream.write(byte[], int, int). 57 * Fills 'dst' with bytes from 'in', throwing EOFException if insufficient bytes are available. 59 public static void readFully(InputStream in, byte[] dst) throws IOException { argument 60 readFully(in, dst, 0, dst.length); 64 * Reads exactly 'byteCount' bytes from 'in' (int 69 readFully(InputStream in, byte[] dst, int offset, int byteCount) argument 93 readFully(InputStream in) argument 104 readFullyNoClose(InputStream in) argument 131 skipAll(InputStream in) argument 149 skipByReading(InputStream in, long byteCount) argument 179 copy(InputStream in, OutputStream out) argument 197 readAsciiLine(InputStream in) argument [all...] |
/libcore/ojluni/src/main/java/java/time/ |
H A D | Ser.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 31 * Redistribution and use in source and binary forms, with or without 37 * * Redistributions in binary form must reproduce the above copyright notice, 38 * this list of conditions and the following disclaimer in the documentation 72 * byte flag would be used in order to specify an alternative version of the type format. 76 * the serialization is performed. In order to deserialize the object it read in the type byte, switching 77 * in order to select which class to call back into. 80 * of the fields is written out with an appropriate size format in descendin 244 readExternal(ObjectInput in) argument 249 read(ObjectInput in) argument 254 readInternal(byte type, ObjectInput in) argument [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
H A D | InputStreamTest.java | 6 * (the "License"); you may not use this file except in compliance with 11 * Unless required by applicable law or agreed to in writing, software 29 InputStream in = new MockInputStream(); 30 in.read(null, -1, 1);
|
/libcore/support/src/test/java/libcore/tlswire/handshake/ |
H A D | HandshakeMessage.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 37 public static HandshakeMessage read(DataInput in) throws IOException { argument 38 int type = in.readUnsignedByte(); 49 int bodyLength = IoUtils.readUnsignedInt24(in); 51 in.readFully(result.body); 61 protected void parseBody(@SuppressWarnings("unused") DataInput in) throws IOException {} argument
|
/libcore/luni/src/main/java/java/nio/charset/ |
H A D | CharsetDecoderICU.java | 45 // These instance variables are always assigned in the methods before being used. This class 130 @Override protected CoderResult decodeLoop(ByteBuffer in, CharBuffer out) { argument 131 if (!in.hasRemaining()) { 135 data[INPUT_OFFSET] = getArray(in); 154 setPosition(in); 176 private int getArray(ByteBuffer in) { argument 177 if (in.hasArray()) { 178 input = in.array(); 179 inEnd = in.arrayOffset() + in 206 setPosition(ByteBuffer in) argument [all...] |
/libcore/ojluni/src/main/java/java/time/zone/ |
H A D | Ser.java | 9 * by Oracle in the LICENSE file that accompanied this code. 11 * This code is distributed in the hope that it will be useful, but WITHOUT 14 * version 2 for more details (a copy is included in the LICENSE file that 36 * Redistribution and use in source and binary forms, with or without 42 * * Redistributions in binary form must reproduce the above copyright notice, 43 * this list of conditions and the following disclaimer in the documentation 124 * in the stream. Refer to each class {@code writeReplace} 178 * @param in the data to read, not null 181 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { argument 182 type = in 186 read(DataInput in) argument 191 readInternal(byte type, DataInput in) argument 237 readOffset(DataInput in) argument 269 readEpochSec(DataInput in) argument [all...] |
/libcore/luni/src/main/java/javax/xml/parsers/ |
H A D | DocumentBuilder.java | 6 * (the "License"); you may not use this file except in compliance with 11 * Unless required by applicable law or agreed to in writing, software 106 InputSource in = new InputSource(is); 107 return parse(in); 130 InputSource in = new InputSource(is); 131 in.setSystemId(systemId); 132 return parse(in); 154 InputSource in = new InputSource(uri); 155 return parse(in); 182 InputSource in [all...] |
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | FilterInputStreamNullSourceTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 49 InputStream in = new CipherInputStream(null, new NullCipher()); 51 in.read(); 56 assertEquals(0, in.available()); 59 in.close(); 105 private void assertReadsFailWithIoException(InputStream in) throws IOException { argument 107 in.read(); 113 in.available(); 118 in 121 assertReadsFailWithNullPointerException(InputStream in) argument [all...] |