Searched refs:in (Results 1 - 25 of 309) sorted by relevance

1234567891011>>

/libcore/ojluni/src/main/java/java/io/
H A DFilterReader.java9 * 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 DFilterInputStream.java9 * 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 DPipedInputStream.java10 * 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
86 * The index of the position in the circular buffer at which the
88 * piped output stream. <code>in&lt;0</code> implies the buffer is empty,
89 * <code>in==out</code> implies the buffer is full
92 protected int in = -1; field in class:PipedInputStream
95 * The index of the position in the circular buffer at which the next
210 if (in == out)
212 if (in <
[all...]
H A DSequenceInputStream.java9 * 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 DInputStreamReader.java9 * 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 DPipedReader.java10 * 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
64 * The index of the position in the circular buffer at which the
66 * piped writer. <code>in&lt;0</code> implies the buffer is empty,
67 * <code>in==out</code> implies the buffer is full
69 int in = -1; field in class:PipedReader
72 * The index of the position in the circular buffer at which the next
184 while (in == out) {
201 if (in <
[all...]
H A DDataInputStream.java9 * 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
30 * types from an underlying input stream in a machine-independent
36 * methods in this class.
49 * @param in the specified input stream
51 public DataInputStream(InputStream in) { argument
52 super(in);
78 * be the number of bytes actually read; these bytes will be stored in
96 * @see java.io.FilterInputStream#in
588 readUTF(DataInput in) argument
[all...]
/libcore/support/src/test/java/libcore/tlswire/util/
H A DIoUtils.java5 * 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 DGZIPInputStream.java9 * 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
35 * This class implements a stream filter for reading compressed data in
67 * @param in the input stream
75 public GZIPInputStream(InputStream in, int size) throws IOException { argument
76 super(in, new Inflater(true), size);
77 readHeader(in);
82 * @param in the input stream
88 public GZIPInputStream(InputStream in) throw argument
244 readUInt(InputStream in) argument
252 readUShort(InputStream in) argument
260 readUByte(InputStream in) argument
279 skipBytes(InputStream in, int n) argument
[all...]
H A DDeflaterInputStream.java10 * 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 DJSONTokener.java5 * 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 DASCIICharsetEncoderTest.java5 * (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 DCharsetDecoderTest.java5 * (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...]
/libcore/luni/src/test/java/libcore/java/util/zip/
H A DDeflaterInputStreamTest.java5 * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
32 InputStream in = new DeflaterInputStream(new ByteArrayInputStream(data));
35 assertEquals(1, in.available());
37 while ((b = in.read()) != -1) {
40 assertEquals(0, in.available());
44 in.close();
46 in.available();
53 java.io.InputStream in = new InflaterInputStream(new ByteArrayInputStream(bytes));
57 while ((count = in
[all...]
H A DGZIPOutputStreamTest.java5 * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
50 InputStream in = DeflaterOutputStreamTest.createInflaterStream(GZIPOutputStream.class, true);
51 assertEquals(1, in.read());
52 assertEquals(2, in.read());
53 assertEquals(3, in.read());
54 in.close();
58 InputStream in = DeflaterOutputStreamTest.createInflaterStream(GZIPOutputStream.class, false);
60 in.read();
64 in
[all...]
/libcore/support/src/test/java/libcore/tlswire/record/
H A DTlsRecord.java5 * 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/dex/src/main/java/com/android/dex/
H A DEncodedValueReader.java5 * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
45 protected final ByteInput in; field in class:EncodedValueReader
50 public EncodedValueReader(ByteInput in) { argument
51 this.in = in;
54 public EncodedValueReader(EncodedValue in) { argument
55 this(in.asByteInput());
64 public EncodedValueReader(ByteInput in, int knownType) { argument
65 this.in
69 EncodedValueReader(EncodedValue in, int knownType) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
H A DClassNotFoundExceptionTest.java6 * (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/luni/src/main/java/libcore/io/
H A DBase64.java5 * you may not use this file except in compliance with the License.
10 * Unless required by applicable law or agreed to in writing, software
23 * Perform encoding and decoding of Base64 byte arrays as described in
42 public static String encode(byte[] in) { argument
43 int len = in.length;
50 // in the input...
52 int byteTripletAsInt = in[i] & 0xff;
56 byteTripletAsInt |= in[i + 1] & 0xff;
59 byteTripletAsInt |= in[i + 2] & 0xff;
110 public static byte[] decode(byte[] in) { argument
115 decode(byte[] in, int len) argument
204 getNextByte(byte[] in, int[] pos, int inLength) argument
223 checkNoTrailingAndReturn( ByteArrayOutputStream output, byte[] in, int i, int inLength) argument
[all...]
H A DStreams.java5 * 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/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DInputStreamTest.java6 * (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 DHandshakeMessage.java5 * 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 DCharsetDecoderICU.java45 // 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/luni/src/main/java/javax/xml/parsers/
H A DDocumentBuilder.java6 * (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 DFilterInputStreamNullSourceTest.java5 * 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...]

Completed in 648 milliseconds

1234567891011>>