* java/io/OutputStreamWriter.java (writeChars): Use a 'do' loop.
Set 'out.count' earlier.
(close): Call setFinished on converter.
(flush): Always write work buffer.
* java/io/PrintStream.java (writeChars): Do 'do' loop.
(close): Call setFinished on converter. Write a 'flush' array.
* java/lang/natString.cc (getBytes): Call setFinished on
converter.
* gnu/gcj/convert/CharsetToBytesAdaptor.java (hasBytes): New
field.
(write): Set hasBytes. Changed 'finished' logic.
(havePendingBytes): Rewrote.
(setFinished): New method.
* gnu/gcj/convert/UnicodeToBytes.java (setFinished): New method.
* testsuite/libjava.lang/RH194522.java: New file.
* testsuite/libjava.lang/RH194522.out: New file.
From-SVN: r115039
2003-12-08 Michael Koch <konqueror@gmx.de>
Fix for PR libgcj/13176.
* java/io/PrintStream.java: Partly revert my previous patches to get
(line_separator): New field.
(converter): New field.
(work): New field.
(work_bytes): New field.
(pw): Removed.
(closed): Removed.
(PrintStrean): Initialize converter and not pw.
(checkError): Flush always, pw doesn't exist anymore.
(close): Close underlying out stream.
(print): New method.
(writeChars): New method.
(print): Use new internal print method.
(println): Likewise.
From-SVN: r74419
* java/io/PrintStream.java (print): Always flush if auto_flush is
set. Don't check for newline characters.
(write (int)): Implement without using a temporary array.
(write (byte[], int, int): Always flush if auto_flush is set. Don't
check for newline characters.
Fixes PR libgcj/11778.
From-SVN: r70284
* java/io/PrintStream.java
(checkError): Call flush() instead of direct flushing of the Writer
object.
(print): Call print(String) instead of direct print method of the
Writer Object.
(println): Call println(String) instead of direct println method of the
Writer Object.
(write): Simplified.
From-SVN: r68632
2003-06-10 Michael Koch <konqueror@gmx.de>
* java/io/PrintStream.java:
Merged version from classpath.
(close): Removed sychronized keyword. This class is not garantied to
be thread-safe.
(write): Likewise.
From-SVN: r67717
* java/io/DataInputStream.java
(convertFromUTF): Merged comment from classpath.
* java/io/PrintStream.java
(error_occured): Renamed from error, merged comment from classpath.
(PrintStream): No need to initialized error.
(checkError): Replace error with error_occurred.
(setError): Likewise.
From-SVN: r66997
* java/io/File.java
(separator): Merged documentation from classpath.
(separatorChar): Merged documentation from classpath.
(pathSeparator): Merged documentation from classpath.
(pathSeparatorChar): Merged documentation from classpath.
(path): Merged documentation from classpath.
(canRead): Merged documentation from classpath.
(canWrite): Merged documentation from classpath.
(createNewFile): Merged documentation from classpath.
(delete): Merged documentation from classpath.
(equals): Merged documentation from classpath.
(exists): Merged documentation from classpath.
(File): Renamed p to name to match classpath, merged documentation
from classpath.
(getAbsolutePath): Merged documentation from classpath.
(getCanonicalPath): Merged documentation from classpath.
(getCanonicalFile): Merged documentation from classpath.
(getName): Merged documentation from classpath.
(getParent): Merged documentation from classpath.
(getParentFile): Merged documentation from classpath.
(getPath): Merged documentation from classpath.
(hashCode): Merged documentation from classpath.
(isAbsolute): Merged documentation from classpath.
(isDirectory): Merged documentation from classpath.
(isFile): Merged documentation from classpath.
(isHidden): Merged documentation from classpath.
(lastModified): Merged documentation from classpath.
(length): Merged documentation from classpath.
(list): Merged documentation from classpath.
(listFiles): Merged documentation from classpath.
(toString): Merged documentation from classpath.
(toURL): Merged documentation from classpath.
(mkdir): Merged documentation from classpath.
(mkdirs): Merged documentation from classpath.
(createTempFile): Merged documentation from classpath.
(setReadOnly): Merged documentation from classpath.
(listRoots): Merged documentation from classpath.
(compareTo): Merged documentation from classpath.
(renameTo): Merged documentation from classpath.
(setLastModified): Merged documentation from classpath.
* java/io/PrintStream.java
(auto_flush): Merged documentation from classpath.
(PrintStream): Merged documentation from classpath.
(checkError): Merged documentation from classpath.
(setError): Merged documentation from classpath.
(close): Merged documentation from classpath.
(flush): Merged documentation from classpath.
(print): Merged documentation from classpath.
(println): Merged documentation from classpath.
(write): Renamed count to len to match classpath,
merged documentation from classpath.
* java/io/RandomAccessFile.java
(readShort): Merged documentation from classpath.
(readUnsignedByte): Merged documentation from classpath.
(readUnsignedShort): Merged documentation from classpath.
(readUTF): Merged documentation from classpath.
(seek): Reformatted, merged documentation from classpath.
(skipBytes): Renamed some variables to match classpath, reformatted,
merged documentation from classpath.
(write): Merged documentation from classpath.
(writeBoolean): Merged documentation from classpath.
(writeByte): Merged documentation from classpath.
(writeShort): Merged documentation from classpath.
(writeChar): Merged documentation from classpath.
(writeInt): Merged documentation from classpath.
(writeLong): Merged documentation from classpath.
(writeFloat): Merged documentation from classpath.
(writeDouble): Merged documentation from classpath.
(writeBytes): Merged documentation from classpath.
(writeChars): Merged documentation from classpath.
(writeUTF): Reformatted.
(getChannel): Reformatted.
From-SVN: r65081
2003-03-28 Michael Koch <konqueror@gmx.de>
* java/io/File.java:
Import needed classes instead of whole packages, merged class
documentation with classpath, moved constants and variables to top of
class.
* java/io/PrintStream.java:
Merged class documentation with classpath, moved constants and
variables to top of class.
* java/io/RandomAccessFile.java
(RandomAccessFile): Merged with classpath.
(read): Merged with classpath).
(read*): Reformatted.
From-SVN: r64974
* 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
* All files: Updated copyright information.
* COPYING: New file.
* COPYING.LIB: Removed.
* LIBGCJ_LICENSE: We now use GPL + special exception.
From-SVN: r32387
�
* 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