Searched refs:read (Results 1 - 25 of 243) sorted by relevance

12345678910

/libcore/crypto/src/main/java/org/conscrypt/
H A DSSLInputStream.java26 * some additional read methods allowing to read TLS specific
41 * @see org.conscrypt.SSLStreamedInput#read()
42 * @see org.conscrypt.SSLBufferedInput#read()
43 * @see org.conscrypt.HandshakeIODataStream#read()
46 public abstract int read() throws IOException; method in class:SSLInputStream
52 return read() & 0x00FF;
59 return (read() << 8) | (read() & 0x00FF);
66 return (read() << 1
92 public byte[] read(int length) throws IOException { method in class:SSLInputStream
101 public int read(byte[] b, int off, int len) throws IOException { method in class:SSLInputStream
[all...]
H A DSSLStreamedInput.java42 * @return the value read from the underlying stream.
43 * @throws IOException if the data could not be read from
49 public int read() throws IOException { method in class:SSLStreamedInput
50 int res = in.read();
/libcore/luni/src/main/java/java/sql/
H A DDataTruncation.java36 private boolean read = false; field in class:DataTruncation
62 * @param read
63 * {@code true} if the truncation occurred on a read operation,
70 public DataTruncation(int index, boolean parameter, boolean read, argument
75 this.read = read;
91 * @param read
92 * true if the truncation occurred on a read operation, false
103 public DataTruncation(int index, boolean parameter, boolean read, argument
105 super(THE_REASON, read
[all...]
/libcore/luni/src/main/java/java/io/
H A DObjectInput.java28 * Indicates the number of bytes of primitive data that can be read without
51 * @return the byte read or -1 if the end of this stream has been reached.
55 public int read() throws IOException; method in interface:ObjectInput
59 * while waiting for input. Returns the number of bytes read,
65 public int read(byte[] buffer) throws IOException; method in interface:ObjectInput
70 * waiting for input. Returns the number of bytes read or -1 if the end of this stream has been
76 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException; method in interface:ObjectInput
81 * @return the object read.
H A DReader.java29 * needs to be subclassed, and at least the {@link #read(char[], int, int)} and
80 * indicates how many characters can be read before the mark is invalidated.
88 * the number of characters that can be read before the mark is
117 * @return the character read or -1 if the end of the reader has been
122 public int read() throws IOException { method in class:Reader
125 if (read(charArray, 0, 1) != -1) {
135 * actually read or -1 if the end of the reader has been reached.
140 public int read(char[] buffer) throws IOException { method in class:Reader
141 return read(buffer, 0, buffer.length);
147 * of characters actually read o
153 public abstract int read(char[] buffer, int offset, int count) throws IOException; method in class:Reader
242 public int read(CharBuffer target) throws IOException { method in class:Reader
[all...]
H A DLineNumberReader.java23 * time {@code '\r'}, {@code '\n'} or {@code "\r\n"} is read. The class has an
75 * indicates how many characters can be read before the mark is invalidated.
82 * the number of characters that can be read from this stream
108 * @return the character read or -1 if the end of the source reader has been
115 public int read() throws IOException { method in class:LineNumberReader
117 int ch = super.read();
119 ch = super.read();
137 * Returns the number of characters actually read or -1 if no characters
138 * have been read and the end of this reader has been reached.
148 public int read(cha method in class:LineNumberReader
[all...]
H A DInputStream.java26 * <p>Most clients will use input streams that read data from the file system
48 * #read() read()} and {@link #read(byte[],int,int) read(byte[],int,int)}. The
65 * Returns an estimated number of bytes that can be read or skipped without blocking for more
72 * blocking": a read may still block waiting for I/O to complete&nbsp;&mdash; the guarantee is
84 * read or skip will actually read or skip that many bytes: they may read o
156 public abstract int read() throws IOException; method in class:InputStream
161 public int read(byte[] buffer) throws IOException { method in class:InputStream
176 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { method in class:InputStream
[all...]
H A DFilterInputStream.java22 * the input data while it is being read. Transformations can be anything from a
69 * indicates how many bytes can be read before the mark is invalidated.
76 * the number of bytes that can be read from this stream before
107 * @return the byte read or -1 if the end of the filtered stream has been
113 public int read() throws IOException { method in class:FilterInputStream
114 return in.read();
117 @Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { method in class:FilterInputStream
118 return in.read(buffer, byteOffset, byteCount);
128 * bytes have been read since setting the mark.
139 * calls to {@code read} wil
[all...]
H A DFilterReader.java22 * input data while it is being read. Transformations can be anything from a
63 * indicates how many bytes can be read before the mark is invalidated.
70 * the number of bytes that can be read from this reader before
106 * @return The character read or -1 if the end of the filtered reader has
112 public int read() throws IOException { method in class:FilterReader
114 return in.read();
121 * number of characters actually read or -1 if no characters were read and
128 public int read(char[] buffer, int offset, int count) throws IOException { method in class:FilterReader
130 return in.read(buffe
[all...]
/libcore/luni/src/test/java/libcore/java/io/
H A DOldSequenceInputStreamTest.java56 si.read();
57 assertEquals("Test 1: Incorrect char read;",
58 s1.charAt(1), (char) si.read());
63 assertEquals("Test 2: Incorrect char read;",
64 s1.charAt(2), (char) si.read());
71 si.read();
79 si.read();
80 si.read();
84 si.read();
93 assertEquals("Test 6: Incorrect char read;",
[all...]
H A DOldStringBufferInputStreamTest.java28 // Test for method int java.io.StringBufferInputStream.read()
31 sbis.read(buf, 0, -1);
37 sbis.read(buf, -1, 1);
43 sbis.read(buf, 10, 1);
H A DOldLineNumberInputStreamTest.java49 assertEquals("Test 1: Failed to read correct byte;",
50 '0', lnis.read());
51 assertEquals("Test 2: Failed to read correct byte on dos text;",
52 '0', lnis2.read());
53 assertEquals("Test 3: Failed to read correct byte on dos text;",
54 '\n', lnis2.read());
55 assertEquals("Test 4: Failed to read correct byte on dos text;",
56 '1', lnis2.read());
57 assertEquals("Test 5: Failed to read correct byte on dos text;",
58 '\n', lnis2.read());
[all...]
H A DOldAndroidBufferedInputStreamTest.java41 Assert.assertEquals(str, read(a));
48 Assert.assertEquals("AbCdEfGhIj", read(b, 10));
62 assertEquals('A', d.read());
64 assertEquals('b', d.read());
65 assertEquals('C', d.read());
67 assertEquals('b', d.read());
76 assertEquals(str, read(e, 10000));
82 public static String read(InputStream a) throws IOException { method in class:OldAndroidBufferedInputStreamTest
86 r = a.read();
98 r = a.read();
105 public static String read(InputStream a, int x) throws IOException { method in class:OldAndroidBufferedInputStreamTest
[all...]
H A DOldReaderTest.java37 assertEquals("Wrong return value!", 4, simple.read(buf));
39 assertEquals("Wrong stuff read!", "Bla ", String.valueOf(buf));
40 simple.read(buf);
42 assertEquals("Wrong stuff read!", "bla,", String.valueOf(buf));
45 simple.read(buf);
55 assertEquals("Wrong return value!", 4, simple.read(buf));
56 assertEquals("Wrong stuff read!", "Bla ", new String(buf));
57 simple.read(buf);
58 assertEquals("Wrong stuff read!", "bla,", new String(buf));
61 simple.read(bu
116 @Override public int read(char[] buf, int offset, int count) { method in class:OldReaderTest.MockReader
[all...]
H A DOldBufferedReaderTest.java63 br.read();
92 br.read(buf, 0, 500);
102 br.read(buf, 0, 1000);
116 in.read(new char[14], 0, 14);
118 assertTrue("Wrong chars", in.read() == (char) 6
119 && in.read() == (char) 7);
130 assertTrue("Wrong chars 2", in.read() == (char) 6
131 && in.read() == (char) 7);
147 int r = br.read();
148 assertTrue("Char read improperl
[all...]
H A DOldCharArrayReaderTest.java74 assertEquals("Test 6: Incorrect character read;",
75 'W', cr.read());
85 cr.read();
86 fail("Failed to throw exception on read from closed stream");
100 cr.read();
103 'W', cr.read());
123 * java.io.CharArrayReader#read()
128 'H', cr.read());
131 cr.read() == '\u8765');
135 cr.read();
[all...]
H A DOldInputStreamTest.java42 public int read() throws IOException { method in class:OldInputStreamTest.MockInputStream
93 // Test 1: This read operation should complete without an error.
94 assertEquals("Test 1: Incorrect count of bytes read.",
95 is.read(b), 10);
100 assertTrue("Test 1: Wrong bytes read.", equal);
102 // Test 2: Test that the correct number of bytes read is returned
105 bytesRead = is.read(b);
106 assertEquals("Test 2: Incorrect count of bytes read.",
112 assertTrue("Test 2: Wrong bytes read.", equal);
115 // the next call of read(byt
[all...]
/libcore/luni/src/main/java/java/lang/
H A DReadable.java23 * Represents a sequence of characters that can be incrementally read (copied)
30 * number of characters read is {@code CharBuffer.remaining()}.
33 * the buffer to be filled with characters read.
34 * @return the number of characters actually read, or -1 if this
39 int read(CharBuffer cb) throws IOException; method in interface:Readable
/libcore/harmony-tests/src/test/java/org/apache/harmony/luni/tests/java/io/
H A DBufferedReaderTest.java94 br.read();
113 br.read(buf, 0, 500);
121 br.read(buf, 0, 1000);
136 in.read(new char[14], 0, 14);
138 assertTrue("Wrong chars", in.read() == (char) 6
139 && in.read() == (char) 7);
146 assertTrue("Wrong chars 2", in.read() == (char) 6
147 && in.read() == (char) 7);
152 int result = br.read(carray);
157 assertEquals("Assert 3:", '3', br.read());
[all...]
/libcore/luni/src/main/java/java/nio/channels/
H A DScatteringByteChannel.java23 * The interface for channels that can read data into a set of buffers in a
32 * This method is equivalent to {@code read(buffers, 0, buffers.length);}
35 * the array of byte buffers to store the bytes being read.
36 * @return the number of bytes actually read.
38 * if the channel is closed by another thread during this read
52 public long read(ByteBuffer[] buffers) throws IOException; method in interface:ScatteringByteChannel
55 * Attempts to read all {@code remaining()} bytes from {@code length} byte
57 * bytes actually read is returned.
59 * If a read operation is in progress, subsequent threads will block until
60 * the read i
88 public long read(ByteBuffer[] buffers, int offset, int length) method in interface:ScatteringByteChannel
[all...]
H A DReadableByteChannel.java23 * A {@code ReadableByteChannel} is a type of {@link Channel} that can read
27 * if a read is already in progress on the channel then subsequent reads will
28 * block until the first read completes. It is undefined whether non-read
36 * The maximum number of bytes that will be read is the
38 * buffer when the method is invoked. The bytes will be read into the buffer
42 * The call may block if other threads are also attempting to read from the
46 * the bytes that were read. The buffer's
51 * @return the number of bytes actually read.
53 * if another thread closes the channel during the read
65 public int read(ByteBuffer buffer) throws IOException; method in interface:ReadableByteChannel
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/nio/tests/java/nio/channels/
H A DSourceChannelTest.java64 * @tests java.nio.channels.Pipe.SourceChannel#read(ByteBuffer)
67 // if anything can read, read method will not block
69 int count = source.read(ByteBuffer.allocate(10));
74 * @tests java.nio.channels.Pipe.SourceChannel#read(ByteBuffer)
79 source.read(nullBuf);
87 * @tests java.nio.channels.Pipe.SourceChannel#read(ByteBuffer)
93 long count = source.read(readBuf);
95 // readBuf is full, read 0 byte expected
96 count = source.read(readBu
[all...]
/libcore/luni/src/main/java/java/security/
H A DDigestInputStream.java80 * @return the byte which was read or -1 at end of stream.
85 public int read() throws IOException { method in class:DigestInputStream
86 // read the next byte
87 int byteRead = in.read();
94 // return byte read
105 * <p>Returns the number of bytes actually read or -1 if the end of the
112 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { method in class:DigestInputStream
113 int bytesRead = in.read(buffer, byteOffset, byteCount);
120 // return number of bytes read
/libcore/luni/src/main/java/java/util/zip/
H A DCheckedInputStream.java26 * same time as the data, on which the checksum is computed, is read from a
62 public int read() throws IOException { method in class:CheckedInputStream
63 int x = in.read();
73 * updated with the bytes read.
74 * Returns the number of bytes actually read or {@code -1} if arrived at the
81 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { method in class:CheckedInputStream
82 int bytesRead = in.read(buffer, byteOffset, byteCount);
90 * Returns the checksum calculated on the stream read so far.
/libcore/luni/src/main/java/libcore/net/url/
H A DFtpURLInputStream.java41 public int read() throws IOException { method in class:FtpURLInputStream
42 return is.read();
46 public int read(byte[] buf, int off, int nbytes) throws IOException { method in class:FtpURLInputStream
47 return is.read(buf, off, nbytes);

Completed in 818 milliseconds

12345678910