Home
last modified time | relevance | path

Searched refs:in (Results 1 – 25 of 411) sorted by relevance

12345678910>>...17

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/
DASCIICharsetEncoderTest.java139 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 …]
DCharsetDecoderTest.java218 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 …]
DCharsetEncoderTest.java282 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/ojluni/src/main/java/java/util/zip/
DGZIPInputStream.java76 public GZIPInputStream(InputStream in, int size) throws IOException { in GZIPInputStream() argument
77 super(in, new Inflater(true), size); in GZIPInputStream()
83 readHeader(in); in GZIPInputStream()
99 public GZIPInputStream(InputStream in) throws IOException { in GZIPInputStream() argument
100 this(in, 512); in GZIPInputStream()
170 CheckedInputStream in = new CheckedInputStream(this_in, crc); in readHeader() local
173 if (readUShort(in) != GZIP_MAGIC) { in readHeader()
177 if (readUByte(in) != 8) { in readHeader()
181 int flg = readUByte(in); in readHeader()
183 skipBytes(in, 6); in readHeader()
[all …]
DDeflaterInputStream.java65 if (in == null) { in ensureOpen()
77 public DeflaterInputStream(InputStream in) { in DeflaterInputStream() argument
78 this(in, new Deflater()); in DeflaterInputStream()
90 public DeflaterInputStream(InputStream in, Deflater defl) { in DeflaterInputStream() argument
91 this(in, defl, 512); in DeflaterInputStream()
104 public DeflaterInputStream(InputStream in, Deflater defl, int bufLen) { in DeflaterInputStream() argument
105 super(in); in DeflaterInputStream()
108 if (in == null) in DeflaterInputStream()
127 if (in != null) { in close()
134 in.close(); in close()
[all …]
/libcore/ojluni/src/main/java/java/io/
DPipedInputStream.java89 protected int in = -1; field in PipedInputStream
206 if (in == out) in receive()
208 if (in < 0) { in receive()
209 in = 0; in receive()
212 buffer[in++] = (byte)(b & 0xFF); in receive()
213 if (in >= buffer.length) { in receive()
214 in = 0; in receive()
233 if (in == out) in receive()
236 if (out < in) { in receive()
237 nextTransferAmount = buffer.length - in; in receive()
[all …]
DFilterReader.java46 protected Reader in; field in FilterReader
54 protected FilterReader(Reader in) { in FilterReader() argument
55 super(in); in FilterReader()
56 this.in = in; in FilterReader()
65 return in.read(); in read()
74 return in.read(cbuf, off, len); in read()
83 return in.skip(n); in skip()
92 return in.ready(); in ready()
99 return in.markSupported(); in markSupported()
108 in.mark(readAheadLimit); in mark()
[all …]
DFilterInputStream.java50 protected volatile InputStream in; field in FilterInputStream
61 protected FilterInputStream(InputStream in) { in FilterInputStream() argument
62 this.in = in; in FilterInputStream()
83 return in.read(); in read()
133 return in.read(b, off, len); in read()
151 return in.skip(n); in skip()
168 return in.available(); in available()
181 in.close(); in close()
201 in.mark(readlimit); in mark()
226 in.reset(); in reset()
[all …]
DSequenceInputStream.java48 InputStream in; field in SequenceInputStream
105 if (in != null) { in nextStream()
106 in.close(); in nextStream()
110 in = (InputStream) e.nextElement(); in nextStream()
111 if (in == null) in nextStream()
114 else in = null; in nextStream()
138 if (in == null) { in available()
141 return in.available(); in available()
163 while (in != null) { in read()
164 int c = in.read(); in read()
[all …]
DPipedReader.java66 int in = -1; field in PipedReader
180 while (in == out) { in receive()
194 if (in < 0) { in receive()
195 in = 0; in receive()
198 buffer[in++] = (char) c; in receive()
199 if (in >= buffer.length) { in receive()
200 in = 0; in receive()
243 && !closedByWriter && (in < 0)) { in read()
249 while (in < 0) { in read()
271 if (in == out) { in read()
[all …]
DInputStreamReader.java71 public InputStreamReader(InputStream in) { in InputStreamReader() argument
72 super(in); in InputStreamReader()
74 sd = StreamDecoder.forInputStreamReader(in, this, (String)null); // ## check lock object in InputStreamReader()
94 public InputStreamReader(InputStream in, String charsetName) in InputStreamReader() argument
97 super(in); in InputStreamReader()
100 sd = StreamDecoder.forInputStreamReader(in, this, charsetName); in InputStreamReader()
112 public InputStreamReader(InputStream in, Charset cs) { in InputStreamReader() argument
113 super(in); in InputStreamReader()
116 sd = StreamDecoder.forInputStreamReader(in, this, cs); in InputStreamReader()
128 public InputStreamReader(InputStream in, CharsetDecoder dec) { in InputStreamReader() argument
[all …]
DDataInputStream.java54 public DataInputStream(InputStream in) { in DataInputStream() argument
55 super(in); in DataInputStream()
103 return in.read(b, 0, b.length); in read()
152 return in.read(b, off, len); in read()
198 int count = in.read(b, off + n, len - n); in readFully()
223 while ((total<n) && ((cur = (int) in.skip(n-total)) > 0)) { in skipBytes()
245 int ch = in.read(); in readBoolean()
268 int ch = in.read(); in readByte()
291 int ch = in.read(); in readUnsignedByte()
510 switch (c = in.read()) { in readLine()
[all …]
/libcore/json/src/main/java/org/json/
DJSONTokener.java68 private final String in; field in JSONTokener
82 public JSONTokener(String in) { in JSONTokener() argument
84 if (in != null && in.startsWith("\ufeff")) { in JSONTokener()
85 in = in.substring(1); in JSONTokener()
87 this.in = in; in JSONTokener()
121 while (pos < in.length()) { in nextCleanInternal()
122 int c = in.charAt(pos++); in nextCleanInternal()
131 if (pos == in.length()) { in nextCleanInternal()
135 char peek = in.charAt(pos); in nextCleanInternal()
140 int commentEnd = in.indexOf("*/", pos); in nextCleanInternal()
[all …]
/libcore/luni/src/test/java/libcore/java/util/zip/
DDeflaterInputStreamTest.java37 InputStream in = new DeflaterInputStream(new ByteArrayInputStream(data)); in testReadByteByByte() local
40 assertEquals(1, in.available()); in testReadByteByByte()
42 while ((b = in.read()) != -1) { in testReadByteByByte()
45 assertEquals(0, in.available()); in testReadByteByByte()
49 in.close(); in testReadByteByByte()
51 in.available(); in testReadByteByByte()
58 try (InputStream in = new InflaterInputStream(new ByteArrayInputStream(bytes))) { in inflate() argument
62 while ((count = in.read(buffer)) != -1) { in inflate()
72 InputStream in = new DeflaterInputStream(new ByteArrayInputStream(data)); in testReadWithBuffer() local
74 assertEquals(1, in.available()); in testReadWithBuffer()
[all …]
/libcore/ojluni/src/main/java/java/time/
DSer.java244 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { in readExternal() argument
245 type = in.readByte(); in readExternal()
246 object = readInternal(type, in); in readExternal()
249 static Object read(ObjectInput in) throws IOException, ClassNotFoundException { in read() argument
250 byte type = in.readByte(); in read()
251 return readInternal(type, in); in read()
254 …private static Object readInternal(byte type, ObjectInput in) throws IOException, ClassNotFoundExc… in readInternal() argument
256 case DURATION_TYPE: return Duration.readExternal(in); in readInternal()
257 case INSTANT_TYPE: return Instant.readExternal(in); in readInternal()
258 case LOCAL_DATE_TYPE: return LocalDate.readExternal(in); in readInternal()
[all …]
/libcore/ojluni/src/main/java/java/time/zone/
DSer.java181 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { in readExternal() argument
182 type = in.readByte(); in readExternal()
183 object = readInternal(type, in); in readExternal()
186 static Object read(DataInput in) throws IOException, ClassNotFoundException { in read() argument
187 byte type = in.readByte(); in read()
188 return readInternal(type, in); in read()
191 …private static Object readInternal(byte type, DataInput in) throws IOException, ClassNotFoundExcep… in readInternal() argument
194 return ZoneRules.readExternal(in); in readInternal()
196 return ZoneOffsetTransition.readExternal(in); in readInternal()
198 return ZoneOffsetTransitionRule.readExternal(in); in readInternal()
[all …]
/libcore/luni/src/main/java/libcore/io/
DStreams.java45 public static int readSingleByte(InputStream in) throws IOException { in readSingleByte() argument
47 int result = in.read(buffer, 0, 1); in readSingleByte()
69 public static void readFully(InputStream in, byte[] dst) throws IOException { in readFully() argument
70 readFully(in, dst, 0, dst.length); in readFully()
79 …public static void readFully(InputStream in, byte[] dst, int offset, int byteCount) throws IOExcep… in readFully() argument
83 if (in == null) { in readFully()
91 int bytesRead = in.read(dst, offset, byteCount); in readFully()
105 public static byte[] readFully(InputStream in) throws IOException { in readFully() argument
107 return readFullyNoClose(in); in readFully()
109 in.close(); in readFully()
[all …]
/libcore/ojluni/src/main/java/java/time/chrono/
DSer.java222 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { in readExternal() argument
223 type = in.readByte(); in readExternal()
224 object = readInternal(type, in); in readExternal()
227 static Object read(ObjectInput in) throws IOException, ClassNotFoundException { in read() argument
228 byte type = in.readByte(); in read()
229 return readInternal(type, in); in read()
232 …private static Object readInternal(byte type, ObjectInput in) throws IOException, ClassNotFoundExc… in readInternal() argument
234 case CHRONO_TYPE: return AbstractChronology.readExternal(in); in readInternal()
235 case CHRONO_LOCAL_DATE_TIME_TYPE: return ChronoLocalDateTimeImpl.readExternal(in); in readInternal()
236 case CHRONO_ZONE_DATE_TIME_TYPE: return ChronoZonedDateTimeImpl.readExternal(in); in readInternal()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DHostnameVerifierTest.java47 InputStream in; in testVerify() local
50 in = new ByteArrayInputStream(X509_FOO); in testVerify()
51 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify()
58 in = new ByteArrayInputStream(X509_HANAKO); in testVerify()
59 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify()
65 in = new ByteArrayInputStream(X509_FOO_BAR); in testVerify()
66 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify()
74 in = new ByteArrayInputStream(X509_FOO_BAR_HANAKO); in testVerify()
75 x509 = (X509Certificate) cf.generateCertificate(in); in testVerify()
88 in = new ByteArrayInputStream(X509_NO_CNS_FOO); in testVerify()
[all …]
/libcore/luni/src/test/java/libcore/java/io/
DFilterInputStreamNullSourceTest.java49 InputStream in = new CipherInputStream(null, new NullCipher()); in testCipherInputStream() local
51 in.read(); in testCipherInputStream()
56 assertEquals(0, in.available()); in testCipherInputStream()
59 in.close(); in testCipherInputStream()
105 private void assertReadsFailWithIoException(InputStream in) throws IOException { in assertReadsFailWithIoException() argument
107 in.read(); in assertReadsFailWithIoException()
113 in.available(); in assertReadsFailWithIoException()
118 in.close(); in assertReadsFailWithIoException()
121 private void assertReadsFailWithNullPointerException(InputStream in) throws IOException { in assertReadsFailWithNullPointerException() argument
123 in.read(); in assertReadsFailWithNullPointerException()
[all …]
/libcore/ojluni/src/main/java/sun/nio/cs/
DStreamDecoder.java62 public static StreamDecoder forInputStreamReader(InputStream in, in forInputStreamReader() argument
72 return new StreamDecoder(in, lock, Charset.forName(csn)); in forInputStreamReader()
77 public static StreamDecoder forInputStreamReader(InputStream in, in forInputStreamReader() argument
81 return new StreamDecoder(in, lock, cs); in forInputStreamReader()
84 public static StreamDecoder forInputStreamReader(InputStream in, in forInputStreamReader() argument
88 return new StreamDecoder(in, lock, dec); in forInputStreamReader()
214 private static FileChannel getChannel(FileInputStream in) { in getChannel() argument
218 return in.getChannel(); in getChannel()
230 private InputStream in; field in StreamDecoder
233 StreamDecoder(InputStream in, Object lock, Charset cs) { in StreamDecoder() argument
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DInputStreamReaderTest.java93 private InputStream in; field in InputStreamReaderTest
108 in = new ByteArrayInputStream(source.getBytes("UTF-8")); in setUp()
109 reader = new InputStreamReader(in, "UTF-8"); in setUp()
127 in.close(); in tearDown()
161 in = new BufferedInputStream( in test_close()
167 reader = new InputStreamReader(in, "utf-8"); in test_close()
168 in.close(); in test_close()
197 InputStreamReader reader2 = new InputStreamReader(in); in test_ConstructorLjava_io_InputStream()
223 reader = new InputStreamReader(in, (String) null); in test_ConstructorLjava_io_InputStreamLjava_lang_String()
229 reader = new InputStreamReader(in, ""); in test_ConstructorLjava_io_InputStreamLjava_lang_String()
[all …]
/libcore/ojluni/src/main/java/sun/security/util/
DDerValue.java255 DerValue(DerInputBuffer in, boolean originalEncodedFormRetained) in DerValue() argument
260 int startPosInInput = in.getPos(); in DerValue()
261 tag = (byte)in.read(); in DerValue()
262 byte lenByte = (byte)in.read(); in DerValue()
263 length = DerInputStream.getLength(lenByte, in); in DerValue()
265 DerInputBuffer inbuf = in.dup(); in DerValue()
286 in.skip(length + offset); in DerValue()
289 buffer = in.dup(); in DerValue()
293 in.skip(length); in DerValue()
297 int consumed = in.getPos() - startPosInInput; in DerValue()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DInflaterInputStreamTest.java43 MyInflaterInputStream(InputStream in) { in MyInflaterInputStream() argument
44 super(in); in MyInflaterInputStream()
47 MyInflaterInputStream(InputStream in, Inflater infl) { in MyInflaterInputStream() argument
48 super(in, infl); in MyInflaterInputStream()
51 MyInflaterInputStream(InputStream in, Inflater infl, int size) { in MyInflaterInputStream() argument
52 super(in, infl, size); in MyInflaterInputStream()
237 try (InputStream in = new InflaterInputStream(new ByteArrayInputStream(deflated))) { in testAvailableNonEmptySource() argument
240 assertEquals(1, in.read()); in testAvailableNonEmptySource()
241 assertEquals(1, in.available()); in testAvailableNonEmptySource()
242 assertEquals(3, in.read()); in testAvailableNonEmptySource()
[all …]
/libcore/luni/src/main/java/javax/xml/parsers/
DDocumentBuilder.java106 InputSource in = new InputSource(is); in parse() local
107 return parse(in); in parse()
130 InputSource in = new InputSource(is); in parse() local
131 in.setSystemId(systemId); in parse()
132 return parse(in); in parse()
154 InputSource in = new InputSource(uri); in parse() local
155 return parse(in); in parse()
182 InputSource in = new InputSource(escapedURI); in parse() local
183 return parse(in); in parse()

12345678910>>...17