/libcore/ojluni/src/main/java/java/sql/ |
H A D | DataTruncation.java | 35 * <P>The SQLstate for a <code>DataTruncation</code> during read is <code>01004</code>. 44 * to 01004 when <code>read</code> is set to <code>true</code> and 22001 45 * when <code>read</code> is set to <code>false</code>, 56 * @param read true if a read was truncated 61 boolean read, int dataSize, 63 super("Data truncation", read == true?"01004":"22001"); 66 this.read = read; 75 * to 01004 when <code>read</cod 60 DataTruncation(int index, boolean parameter, boolean read, int dataSize, int transferSize) argument 93 DataTruncation(int index, boolean parameter, boolean read, int dataSize, int transferSize, Throwable cause) argument 171 private boolean read; field in class:DataTruncation [all...] |
/libcore/ojluni/src/main/java/sun/net/ |
H A D | TelnetInputStream.java | 32 * This class overrides read to do CRLF processing as specified in 90 public int read() throws IOException { method in class:TelnetInputStream 92 return super.read(); 106 if ((c = super.read()) == '\r') { /* CR */ 107 switch (c = super.read()) { 127 /** read into a byte array */ 128 public int read(byte bytes[]) throws IOException { method in class:TelnetInputStream 129 return read(bytes, 0, bytes.length); 136 public int read(byte bytes[], int off, int length) throws IOException { method in class:TelnetInputStream 138 return super.read(byte [all...] |
/libcore/ojluni/src/main/java/java/io/ |
H A D | ObjectInput.java | 42 * defines where the object is "read" from. 44 * @return the object read from the stream 56 * @return the byte read, or -1 if the end of the 60 public int read() throws IOException; method in interface:ObjectInput 65 * @param b the buffer into which the data is read 66 * @return the actual number of bytes read, -1 is 70 public int read(byte b[]) throws IOException; method in interface:ObjectInput 75 * @param b the buffer into which the data is read 77 * @param len the maximum number of bytes read 78 * @return the actual number of bytes read, 82 public int read(byte b[], int off, int len) throws IOException; method in interface:ObjectInput [all...] |
H A D | FilterInputStream.java | 75 * simply performs <code>in.read()</code> and returns the result. 82 public int read() throws IOException { method in class:FilterInputStream 83 return in.read(); 92 * <code>read(b, 0, b.length)</code> and returns 94 * <i>not</i> do <code>in.read(b)</code> instead; 99 * @param b the buffer into which the data is read. 100 * @return the total number of bytes read into the buffer, or 104 * @see java.io.FilterInputStream#read(byte[], int, int) 106 public int read(byte b[]) throws IOException { method in class:FilterInputStream 107 return read( 132 public int read(byte b[], int off, int len) throws IOException { method in class:FilterInputStream [all...] |
H A D | FilterReader.java | 64 public int read() throws IOException { method in class:FilterReader 65 return in.read(); 73 public int read(char cbuf[], int off, int len) throws IOException { method in class:FilterReader 74 return in.read(cbuf, off, len); 87 * Tells whether this stream is ready to be read.
|
H A D | Reader.java | 31 * subclass must implement are read(char[], int, int) and close(). Most 84 * Attempts to read characters into the specified character buffer. 89 * @param target the buffer to read characters into 94 * @throws java.nio.ReadOnlyBufferException if target is a read only buffer 97 public int read(java.nio.CharBuffer target) throws IOException { method in class:Reader 100 int n = read(cbuf, 0, len); 113 * @return The character read, as an integer in the range 0 to 65535 119 public int read() throws IOException { method in class:Reader 121 if (read(cb, 0, 1) == -1) 133 * @return The number of characters read, o 139 public int read(char cbuf[]) throws IOException { method in class:Reader 157 abstract public int read(char cbuf[], int off, int len) throws IOException; method in class:Reader [all...] |
H A D | InputStream.java | 40 * @see java.io.InputStream#read() 65 public abstract int read() throws IOException; method in class:InputStream 69 * the buffer array <code>b</code>. The number of bytes actually read is 73 * <p> If the length of <code>b</code> is zero, then no bytes are read and 74 * <code>0</code> is returned; otherwise, there is an attempt to read at 77 * least one byte is read and stored into <code>b</code>. 79 * <p> The first byte read is stored into element <code>b[0]</code>, the 80 * next one into <code>b[1]</code>, and so on. The number of bytes read is, 82 * number of bytes actually read; these bytes will be stored in elements 87 * <p> The <code>read( 100 public int read(byte b[]) throws IOException { method in class:InputStream 161 public int read(byte b[], int off, int len) throws IOException { method in class:InputStream [all...] |
H A D | LineNumberInputStream.java | 39 * {@code 1} when a {@code read} returns a newline character. 76 * The {@code read} method of 77 * {@code LineNumberInputStream} calls the {@code read} 91 public int read() throws IOException { method in class:LineNumberInputStream 97 c = in.read(); 102 pushBack = in.read(); 117 * The {@code read} method of 119 * {@code read} method of zero arguments to fill in the byte array. 121 * @param b the buffer into which the data is read. 123 * @param len the maximum number of bytes read 130 public int read(byte b[], int off, int len) throws IOException { method in class:LineNumberInputStream [all...] |
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | OldSequenceInputStreamTest.java | 58 si.read(); 59 assertEquals("Test 1: Incorrect char read;", 60 s1.charAt(1), (char) si.read()); 65 assertEquals("Test 2: Incorrect char read;", 66 s1.charAt(2), (char) si.read()); 73 si.read(); 81 si.read(); 82 si.read(); 86 si.read(); 95 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 | 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...] |
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 | OldCharArrayReaderTest.java | 74 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...] |
/libcore/ojluni/src/main/java/java/lang/ |
H A D | Readable.java | 32 * a <tt>Readable</tt> are made available to callers of the read 40 * Attempts to read characters into the specified character buffer. 45 * @param cb the buffer to read characters into 50 * @throws java.nio.ReadOnlyBufferException if cb is a read only buffer 52 public int read(java.nio.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/ojluni/src/main/java/java/nio/channels/ |
H A D | ScatteringByteChannel.java | 33 * A channel that can read bytes into a sequence of buffers. 35 * <p> A <i>scattering</i> read operation reads, in a single invocation, a 57 * <p> An invocation of this method attempts to read up to <i>r</i> bytes 68 * <p> Suppose that a byte sequence of length <i>n</i> is read, where 80 * already initiated a read operation upon this channel, however, then an 97 * @return The number of bytes read, possibly zero, 112 * while the read operation is in progress 116 * while the read operation is in progress, thereby 123 public long read(ByteBuffer[] dsts, int offset, int length) method in interface:ScatteringByteChannel 129 * <p> An invocation of this method of the form <tt>c.read(dst 160 public long read(ByteBuffer[] dsts) throws IOException; method in interface:ScatteringByteChannel [all...] |
/libcore/ojluni/src/main/java/java/util/zip/ |
H A D | CheckedInputStream.java | 33 * An input stream that also maintains a checksum of the data being read. 55 * @return the byte read, or -1 if the end of the stream is reached. 58 public int read() throws IOException { method in class:CheckedInputStream 59 int b = in.read(); 69 * bytes are read and <code>0</code> is returned. 70 * @param buf the buffer into which the data is read 72 * @param len the maximum number of bytes read 73 * @return the actual number of bytes read, or -1 if the end 81 public int read(byte[] buf, int off, int len) throws IOException { method in class:CheckedInputStream 82 len = in.read(bu [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/ojluni/src/main/java/sun/nio/ch/ |
H A D | ChannelInputStream.java | 50 // the read) we never do that, though. 52 // read(ReadableByteChannel,ByteBuffer, boolean block) 53 public static int read(ReadableByteChannel ch, ByteBuffer bb) method in class:ChannelInputStream 65 int n = ch.read(bb); 72 return ch.read(bb); 85 public synchronized int read() throws IOException { method in class:ChannelInputStream 88 int n = this.read(b1); 94 public synchronized int read(byte[] bs, int off, int len) method in class:ChannelInputStream 110 return read(bb); 113 protected int read(ByteBuffe method in class:ChannelInputStream [all...] |