/libcore/luni/src/main/java/java/sql/ |
H A D | DataTruncation.java | 36 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 D | ObjectInput.java | 28 * 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 D | Reader.java | 29 * 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 D | LineNumberReader.java | 23 * 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 D | InputStream.java | 26 * <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 — 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 D | FilterInputStream.java | 22 * 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 D | FilterReader.java | 22 * 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 D | OldSequenceInputStreamTest.java | 56 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 D | OldStringBufferInputStreamTest.java | 28 // 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 D | OldLineNumberInputStreamTest.java | 49 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 D | OldAndroidBufferedInputStreamTest.java | 41 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 D | OldReaderTest.java | 37 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 D | OldBufferedReaderTest.java | 63 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...] |
/libcore/luni/src/main/java/java/lang/ |
H A D | Readable.java | 23 * 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/tests/java/io/ |
H A D | LineNumberInputStreamTest.java | 60 lnis.read(); 61 lnis.read(); 63 assertEquals("stream returned incorrect line number after read", 1, 79 assertEquals("Failed to mark", '0', lnis.read()); 83 * java.io.LineNumberInputStream#read() 86 assertEquals("Failed to read correct byte", '0', lnis.read()); 87 assertEquals("Failed to read correct byte on dos text", '0', lnis2 88 .read()); 89 assertTrue("Failed to read correc [all...] |
H A D | BufferedReaderTest.java | 94 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...] |
H A D | InputStreamTest.java | 30 in.read(null, -1, 1); 38 public int read() throws IOException { method in class:InputStreamTest.MockInputStream
|
H A D | BufferedInputStreamTest.java | 97 str.read(); 110 str.read(); 121 // Ensure buffer gets filled by evaluating one read 122 is.read(); 129 is.read(); 131 // is.read should now throw an exception because it will have to 133 is.read(); 134 fail("Exception should have been triggered by read()"); 198 public int read() { 203 public int read(byt [all...] |
H A D | StringBufferInputStreamTest.java | 45 * java.io.StringBufferInputStream#read() 48 // Test for method int java.io.StringBufferInputStream.read() 51 sbis.read(buf, 0, 5); 56 * java.io.StringBufferInputStream#read(byte[], int, int) 59 // Test for method int java.io.StringBufferInputStream.read(byte [], 61 assertEquals("Read returned incorrect char", 'H', sbis.read()); 72 assertEquals("Failed to reset", 'H', sbis.read()); 82 assertEquals("Skip positioned at incorrect char", 'W', sbis.read());
|
/libcore/luni/src/main/java/java/nio/channels/ |
H A D | ScatteringByteChannel.java | 23 * 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 D | ReadableByteChannel.java | 23 * 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/tests/java/nio/channels/ |
H A D | SourceChannelTest.java | 64 * @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 D | DigestInputStream.java | 80 * @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 D | CheckedInputStream.java | 26 * 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 D | FtpURLInputStream.java | 41 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);
|