Searched defs:read (Results 1 - 25 of 98) sorted by relevance

1234

/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/luni/src/main/java/java/nio/channels/
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...]
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...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DInputStreamTest.java30 in.read(null, -1, 1);
38 public int read() throws IOException { method in class:InputStreamTest.MockInputStream
/libcore/luni/src/test/java/libcore/java/io/
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 DOldAndroidPushbackReaderTest.java37 Assert.assertEquals("PUSHAbCdEfGhIjKlMnOpQrStUvWxYz", read(a));
45 Assert.assertEquals("XAbCdEfGhI", read(b, 10));
58 public static String read(Reader a) throws IOException { method in class:OldAndroidPushbackReaderTest
62 r = a.read();
69 public static String read(Reader a, int x) throws IOException { method in class:OldAndroidPushbackReaderTest
71 int len = a.read(b, 0, x);
83 r = a.read();
H A DOldAndroidBufferedReaderTest.java39 assertEquals(str, read(a));
46 assertEquals("AbCdEfGhIj", read(b, 10));
66 public static String read(Reader a) throws IOException { method in class:OldAndroidBufferedReaderTest
70 r = a.read();
77 public static String read(Reader a, int x) throws IOException { method in class:OldAndroidBufferedReaderTest
79 int len = a.read(b, 0, x);
91 r = a.read();
104 r = a.read();
H A DOldAndroidByteArrayInputStreamTest.java38 Assert.assertEquals(str, read(a));
39 Assert.assertEquals("AbCdEfGhIj", read(b, 10));
44 public static String read(InputStream a) throws IOException { method in class:OldAndroidByteArrayInputStreamTest
48 r = a.read();
55 public static String read(InputStream a, int x) throws IOException { method in class:OldAndroidByteArrayInputStreamTest
57 int len = a.read(b, 0, x);
69 r = a.read();
82 r = a.read();
H A DOldAndroidCharArrayReaderTest.java37 Assert.assertEquals(str, read(a));
38 Assert.assertEquals("AbCdEfGhIj", read(b, 10));
43 public static String read(Reader a) throws IOException { method in class:OldAndroidCharArrayReaderTest
47 r = a.read();
54 public static String read(Reader a, int x) throws IOException { method in class:OldAndroidCharArrayReaderTest
56 int len = a.read(b, 0, x);
68 r = a.read();
81 r = a.read();
H A DOldAndroidDataInputStreamTest.java39 Assert.assertEquals(str, read(a));
46 Assert.assertEquals("AbCdEfGhIj", read(b, 10));
108 public static String read(InputStream a) throws IOException { method in class:OldAndroidDataInputStreamTest
112 r = a.read();
119 public static String read(InputStream a, int x) throws IOException { method in class:OldAndroidDataInputStreamTest
121 int len = a.read(b, 0, x);
133 r = a.read();
146 r = a.read();
H A DOldAndroidLineNumberReaderTest.java43 Assert.assertEquals(str, read(a));
53 Assert.assertEquals("AbCdEfGhIj", read(b, 10));
80 public static String read(Reader a) throws IOException { method in class:OldAndroidLineNumberReaderTest
84 r = a.read();
91 public static String read(Reader a, int x) throws IOException { method in class:OldAndroidLineNumberReaderTest
93 int len = a.read(b, 0, x);
105 r = a.read();
118 r = a.read();
H A DOldAndroidPushbackInputStreamTest.java37 Assert.assertEquals("pushAbCdEfGhIjKlM\nOpQrStUvWxYz", read(a));
45 Assert.assertEquals("XAbCdEfGhI", read(b, 10));
58 public static String read(InputStream a) throws IOException { method in class:OldAndroidPushbackInputStreamTest
62 r = a.read();
69 public static String read(InputStream a, int x) throws IOException { method in class:OldAndroidPushbackInputStreamTest
71 int len = a.read(b, 0, x);
83 r = a.read();
96 r = a.read();
H A DOldAndroidStringReaderTest.java35 Assert.assertEquals(str, read(a));
36 Assert.assertEquals("AbCdEfGhIj", read(b, 10));
41 public static String read(Reader a) throws IOException { method in class:OldAndroidStringReaderTest
45 r = a.read();
52 public static String read(Reader a, int x) throws IOException { method in class:OldAndroidStringReaderTest
54 int len = a.read(b, 0, x);
66 r = a.read();
79 r = a.read();
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/
H A DBrokenInputStream.java24 * IOException after having read a specified number of bytes. Used for
41 public int read() throws IOException { method in class:BrokenInputStream
47 return stream.read();
/libcore/luni/src/main/java/java/io/
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...]
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 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 DSequenceInputStream.java42 * {@code s1} and {@code s2} as the sequence of streams to read from.
124 * an integer in the range from 0 to 255. It tries to read from the current
126 * the next one. Blocks until one byte has been read, the end of the last
129 * @return the byte read or -1 if either the end of the last stream in the
137 public int read() throws IOException { method in class:SequenceInputStream
139 int result = in.read();
151 * Blocks only until at least 1 byte has been read, the end of the stream
155 * To do this it will read only as many bytes as a call to read on the
157 * requested by {@code byteCount}, it will not retry to read mor
173 public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException { method in class:SequenceInputStream
[all...]
H A DStringBufferInputStream.java31 * The source string containing the data to read.
73 * @return the byte read or -1 if the end of the source string has been
77 public synchronized int read() { method in class:StringBufferInputStream
81 @Override public synchronized int read(byte[] buffer, int byteOffset, int byteCount) { method in class:StringBufferInputStream
/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/support/src/test/java/tests/support/
H A DSupport_ASimpleInputStream.java63 public int read() throws IOException { method in class:Support_ASimpleInputStream
H A DSupport_ASimpleReader.java56 public int read(char[] dest, int offset, int count) throws IOException { method in class:Support_ASimpleReader
H A DThrowingReader.java26 * read.
38 @Override public int read() throws IOException { method in class:ThrowingReader
40 int result = super.read();
45 @Override public int read(char[] buf, int offset, int count) method in class:ThrowingReader
53 int returned = super.read(buf, offset, count);

Completed in 314 milliseconds

1234