Commit Graph

22 Commits

Author SHA1 Message Date
David Daney 8ceb88d4cd PR libgcj/9715, PR libgcj/19132:
* java/nio/charset/Charset.java (charsetForName): Try default
	provider first.
	(availableCharsets): Re-merged.
	(providers2): Likewise.
	(defaultCharset): Likewise.
	* sources.am, Makefile.in: Rebuilt.
	* gnu/java/nio/charset/Provider.java: Removed.
	* java/io/OutputStreamWriter.java
	(OutputStreamWriter(OutputStream,Charset)): New constructor.
	(OutputStreamWriter(OutputStream,CharsetEncoder)): Likewise.
	* java/io/InputStreamReader.java
	(InputStreamReader(InputStream,CharsetDecoder)): New constructor.
	(InputStreamReader(InputStream,Charset)): Likewise.
	* gnu/gcj/convert/BytesToUnicode.java (getDecoder): Try a
	BytesToCharsetAdaptor.
	* gnu/gcj/convert/UnicodeToBytes.java (getEncoder): Try a
	CharsetToBytesAdaptor.
	* gnu/gcj/convert/CharsetToBytesAdaptor.java: New file.
	* gnu/gcj/convert/BytesToCharsetAdaptor.java: New file.
	* mauve-libgcj: Remove getEncoding exclusion.

Co-Authored-By: Tom Tromey <tromey@redhat.com>

From-SVN: r109294
2006-01-03 22:58:31 +00:00
Tom Tromey 6dfb90cf55 InputStreamReader.java (refill): Handle no-progress case correctly.
* java/io/InputStreamReader.java (refill): Handle no-progress
	case correctly.
	* gnu/gcj/convert/IOConverter.java: Add 'utf8' alias.

From-SVN: r101663
2005-07-06 20:10:41 +00:00
Kelley Cook 917b04f492 Update FSF address
From-SVN: r101453
2005-06-30 03:22:09 +00:00
David Daney fc6b4aa43a re PR libgcj/20389 (BufferedInputStream gets ArrayIndexOutOfBoundsExeception)
2005-03-09  David Daney  <ddaney@avtrex.com>

	PR libgcj/20389
	Merge BufferedInputStream from GNU Classpath.
	* java/io/BufferedInputStream.java (marktarget): Field removed.
	(CHUNKSIZE): Field removed.
	(bufferSize): New field.
	(BufferedInputStream): Initialize fields.
	(close): Invalidate mark and buffer indexes.
	(mark):  Rewritten.
	(read()): Move mark handling code to refill.
	(read(byte[], int, int)): Ditto.
	(skip): Ditto and simplify EOF testing.
	(refill): Rewritten.
	* java/io/InputStreamReader.java (refill): Removed mark and reset
	of internal BufferedInputStream.

From-SVN: r96217
2005-03-09 22:11:33 +00:00
Michael Koch 171a3e0c44 InputStreamReader.java: Fixed @author tag.
2005-02-21  Michael Koch  <konqueror@gmx.de>

	* java/io/InputStreamReader.java:
	Fixed @author tag.

From-SVN: r95323
2005-02-21 08:27:00 +00:00
Michael Koch 9f714d5eec BufferedWriter.java, [...]: Fixed javadocs all over, rename arguments to match javadocs, fixed coding style.
2004-04-20  Michael Koch  <konqueror@gmx.de>

	* java/io/BufferedWriter.java,
	java/io/ByteArrayInputStream.java,
	java/io/CharArrayWriter.java,
	java/io/DataInput.java,
	java/io/DataInputStream.java,
	java/io/File.java,
	java/io/FilterInputStream.java,
	java/io/InputStream.java,
	java/io/InputStreamReader.java,
	java/io/ObjectInputStream.java,
	java/io/ObjectStreamClass.java,
	java/io/PipedInputStream.java,
	java/io/PipedReader.java,
	java/io/PushbackInputStream.java,
	java/io/PushbackReader.java,
	java/io/RandomAccessFile.java,
	java/io/SerializablePermission.java,
	java/io/StreamTokenizer.java,
	java/io/StringWriter.java,
	java/io/WriteAbortedException.java,
	java/io/Writer.java:
	Fixed javadocs all over, rename arguments to match javadocs,
	fixed coding style.

From-SVN: r80897
2004-04-20 11:37:41 +00:00
Mohan Embar ae30b3b25d BufferedReader.java (sbuf): New field.
* java/io/BufferedReader.java (sbuf): New field.
	(readLine): Use String.valueOf instead of new String() as per
	Per Bothner's suggestion. Use instance sbuf field instead of a
	local StringBuffer instance.
	* java/io/InputStreamReader.java (read(char[],int,int)): Pass the
	caller's buffer to refill().
	(read(void)): Pass our internal work buffer to refill if our
	input queue is empty.
	(refill): Changed return type to int. Use the specified buffer
	instead of our work buffer as per Bryce McKinlay's suggestion.
	Return the number of characters read or -1 for EOF.

From-SVN: r76927
2004-01-30 06:33:43 +00:00
Michael Koch d8048dc2f7 2003-05-09 Michael Koch <konqueror@gmx.de>
* java/io/DataOutputStream.java
	(writeShort): Made it synchronized.
	(writeChar): Likewise.
	(writeInt): Likewise.
	(writeLong): Liekwise.
	(writeUTF): Made it synchronized, renamed argument to match classpath.
	* java/io/InputStreamReader.java
	(converter): Added documentation.
	(read): Merged documentation from classpath.
	* java/io/OutputStreamWriter.java
	(OutputStreamWriter): Merged documentation from classpath.
	(close): Reformatted.
	(getEncoding): Likewise.
	(flush): Likewise.
	(write): Merged documentation from classpath, reformatted.

From-SVN: r66624
2003-05-09 07:10:58 +00:00
Michael Koch 83f564f76f 2003-05-06 Michael Koch <konqueror@gmx.de>
* java/io/DataOutputStream.java
	(write): Renamed argument to "value", merged documentation from
	classpath.
	(writeBoolean): Likewise.
	(writeByte): Likewise.
	(writeShort): Likewise.
	(writeChar): Likewise.
	(writeInt): Likewise.
	(writeLong): Likewise.
	(writeFloat): Likewise.
	(writeDouble): Likewise.
	(writeBytes): Likewise.
	(writeChars): Likewise.
	(writeUTF): Likewise.
	* java/io/File.java
	(performDelete): Added documentation.
	(performList): Likewise.
	(performMkdir): Likewise.
	(performSetReadOnly): Likewise.
	(performRenameTo): Likewise.
	(performSetLastModified): Likewise.
	(delete): Made it sychronized.
	(renameTo): Made it sychronized.
	(equals): Reformatted.
	(isHidden): Likewise.
	(listFiles): Likewise.
	(setReadOnly): Likewise.
	(listRoots): Likewise.
	(setLastModified): Likewise.
	(checkRead): Likewise.
	(checkWrite): Likewise.
	* java/io/FileInputStream.java
	(skip): Made it sychronized, merged from classpath.
	* java/io/FileOutputStream.java
	(write): Merged from classpath.
	* java/io/InputStreamReader.java:
	(InputStreamReader): Merged documentation from classpath.

From-SVN: r66520
2003-05-06 10:07:28 +00:00
Michael Koch 950ebbeaf0 2003-03-24 Michael Koch <konqueror@gmx.de>
* java/io/DataOutputStream.java
	(write): Merged from classpath.
	* java/io/File.java:
	Merged copyrigth with classpath.
	* java/io/FileInputStream.java
	(getChannel): Made it synchronized instead of using a synchronized
	block.
	* java/io/FileOutputStream.java: Reformatted.
	* java/io/InputStreamReader.java
	(InputStreamReader): Renamed enc to encoding_name.
	(close): Merged documentation from classpath.
	(getEncoding): Merged documentation from classpath.
	(ready): Merged documentation from classpath.
	(read): Merged documentation from classpath.
	* java/io/LineNumberReader.java
	(lineNumber): Made it private.
	(LineNumberReader): Use Constant instead of a direct value.
	* java/io/OutputStreamWriter.java
	(OutputStreamWriter): Renamed enc to encoding_scheme, merged
	documentation from classpath.
	(close): Merged documentation from classpath.
	(flush): Merged documentation from classpath.
	(write): Merged documentation from classpath.
	* java/io/PrintStream.java: Reformatted.

From-SVN: r64806
2003-03-24 15:43:22 +00:00
Michael Koch 04b3370bfd DataOutputStream.java, [...]: Merged copyright statements with classpath for easier merging.
2003-03-20  Michael Koch  <konqueror@gmx.de>

	* java/io/DataOutputStream.java,
	java/io/File.java,
	java/io/FileInputStream.java,
	java/io/FileOutputStream.java,
	java/io/InputStreamReader.java,
	java/io/LineNumberReader.java,
	java/io/OutputStreamWriter.java,
	java/io/PrintStream.java,
	java/io/RandomAccessFile.java:
	Merged copyright statements with classpath for easier merging.

From-SVN: r64608
2003-03-20 07:47:01 +00:00
Mark Wielaard 114775850c InputStreamReader.java (getEncoding): Return null when closed.
* java/io/InputStreamReader.java (getEncoding): Return null when
       closed.
       * java/io/OutputStreamWriter.java (getEncoding): Likewise.

From-SVN: r62875
2003-02-13 23:28:57 +00:00
Tom Tromey 012ca3e055 InputStreamReader.java (refill): Only call refill on BufferedInputStream when appropriate constraints are met.
* java/io/InputStreamReader.java (refill): Only call refill on
	BufferedInputStream when appropriate constraints are met.

From-SVN: r44675
2001-08-06 22:01:32 +00:00
Tom Tromey a9a399fe24 re PR libgcj/3426 (java.io.InputStreamReader, infinite loop)
Fix for PR libgcj/3426:
	* gnu/gcj/convert/natIconv.cc: Include CharConversionException.h,
	errno.h.
	(read): Throw exception if character conversion fails.
	* java/io/BufferedInputStream.java (refill): Now package-private.
	* java/io/InputStreamReader.java (ready): Simplified.
	(refill): New method.
	(read): Use it.

Co-Authored-By: David Brownell <david-b@pacbell.net>

From-SVN: r43975
2001-07-13 05:41:28 +00:00
Tom Tromey 8a5f950e04 re PR libgcj/1913 (reading closed streams throws NullPointerException, not IOException)
From paul@dawa.demon.co.uk.  Fix for PR libgcj/1913:
	* java/io/InputStreamReader.java (ready, read): Throw IOException
	if stream has been closed.

From-SVN: r39553
2001-02-09 01:54:38 +00:00
Bryce McKinlay d02bc1fb25 InflaterInputStream (read): Don't return -1 unless the infate() call didn't deliver any output.
* java/util/zip/InflaterInputStream (read): Don't return -1 unless
	the infate() call didn't deliver any output. Throw a ZipException if
	the needsDictionary() call returns true.
	* java/io/ByteArrayInputStream (read): Remove redundant bounds checks.
	* java/io/InputStreamReader: Use the default buffer size for the
	contained BufferedInputStream.

From-SVN: r37846
2000-11-29 10:06:03 +00:00
Tom Tromey 2ba5f77454 All files: Updated copyright information.
* All files: Updated copyright information.
	* COPYING: New file.
	* COPYING.LIB: Removed.
	* LIBGCJ_LICENSE: We now use GPL + special exception.

From-SVN: r32387
2000-03-07 19:55:28 +00:00
Tom Tromey 7c734b1758 * All files: Updated copyright to reflect Cygnus purchase.
From-SVN: r31504
2000-01-19 18:39:27 +00:00
Bryce McKinlay 6b5ba2ce34 PrintStream (PrintStream): Fix illegal usage of "this" before "super".
1999-11-01  Bryce McKinlay  <bryce@albatross.co.nz>

        * java/io/PrintStream (PrintStream): Fix illegal usage of "this"
          before "super".
        * java/io/OutputStreamWriter (OutputStreamWriter): ditto.
        * java/io/InputStreamReader (InputStreamReader): ditto.

From-SVN: r30300
1999-11-01 01:15:37 +00:00
Tom Tromey 9733e4ee31 InputStreamReader.java (read): If length is 0, return 0.
* java/io/InputStreamReader.java (read): If length is 0, return
	0.  Reset `wpos' and `wcount' when buffer has been filled and
	emptied.
	* java/util/Properties.java (save): Removed `FIXME' comment.
	(load): Invalid characters in \u now treated as terminators.
	Make sure to append character resulting from `\' handling.
	Cast to `char' when appending to key or value.
	(skip_ws): Inverted test for whitespace.

From-SVN: r26862
1999-05-10 12:33:07 +00:00
Per Bothner 839df96120 InputStreamReader.java (<init>): Set super.in correctly.
�
	* java/io/InputStreamReader.java (<init>):  Set super.in correctly.
	* java/io/OutputStreamWriter.java (<init>):  Set super.in correctly.
	(writeChars):  Don't be quite so eager to flush.
	* java/io/PrintStream.java:  Rewrite.  Now more similar to
	OutputStreamWriter, using explicit UnicodeToBytes converter.
	Also, autoflush does not need to flush so often.
	* java/lang/natString.cc (getBytes):  More efficient algorithm.
 	(init(jbyteArray,jint,jint,jstring)):  More efficient.

From-SVN: r26509
1999-04-16 11:35:02 -07:00
Tom Tromey ee9dd3721b Initial revision
From-SVN: r26263
1999-04-07 14:42:40 +00:00