public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/21270] New: BufferedReader.read( char[], int, int ) returns less than expected number of read chars
@ 2005-04-28 19:36 mnefedov at rogers dot com
  2005-04-28 19:45 ` [Bug libgcj/21270] " pinskia at gcc dot gnu dot org
  2005-04-28 21:52 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: mnefedov at rogers dot com @ 2005-04-28 19:36 UTC (permalink / raw)
  To: java-prs

When 8K of data is requested gcj returns only 2K (Sun's VM returns full 8K).

example code:

import java.io.*;

public class BufferedReaderReadTest {
	public static void main( String [] args ) throws Exception {

		char [] b = new char[ 8 * 1024 ];

		BufferedReader in = new BufferedReader( new FileReader( args
[0] ), 8 * 1024 );

		System.out.println( "read() = " + in.read( b, 0, b.length ) );

		in.close();
	}
}

-- 
           Summary: BufferedReader.read( char[], int, int ) returns less
                    than expected number of read chars
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mnefedov at rogers dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21270


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libgcj/21270] BufferedReader.read( char[], int, int ) returns less than expected number of read chars
  2005-04-28 19:36 [Bug libgcj/21270] New: BufferedReader.read( char[], int, int ) returns less than expected number of read chars mnefedov at rogers dot com
@ 2005-04-28 19:45 ` pinskia at gcc dot gnu dot org
  2005-04-28 21:52 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-28 19:45 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-28 19:45 -------
Note BufferedReader does not need to read in the full buffer, it actually is a non blocking reader:
>From <http://java.sun.com/j2se/1.4.2/docs/api/java/io/
BufferedReader.html#read(char[],%20int,%20int)>
The ready method of the underlying stream  returns false, indicating that further input requests  would 
block.

so I don't know if this is a real bug or not.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21270


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libgcj/21270] BufferedReader.read( char[], int, int ) returns less than expected number of read chars
  2005-04-28 19:36 [Bug libgcj/21270] New: BufferedReader.read( char[], int, int ) returns less than expected number of read chars mnefedov at rogers dot com
  2005-04-28 19:45 ` [Bug libgcj/21270] " pinskia at gcc dot gnu dot org
@ 2005-04-28 21:52 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-28 21:52 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-28 21:52 -------


*** This bug has been marked as a duplicate of 18376 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21270


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-28 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-28 19:36 [Bug libgcj/21270] New: BufferedReader.read( char[], int, int ) returns less than expected number of read chars mnefedov at rogers dot com
2005-04-28 19:45 ` [Bug libgcj/21270] " pinskia at gcc dot gnu dot org
2005-04-28 21:52 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).