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
This commit is contained in:
parent
6db450f90a
commit
950ebbeaf0
9 changed files with 140 additions and 50 deletions
|
@ -280,15 +280,12 @@ public class FileInputStream extends InputStream
|
|||
* A file channel must be created by first creating an instance of
|
||||
* Input/Output/RandomAccessFile and invoking the getChannel() method on it.
|
||||
*/
|
||||
public FileChannel getChannel ()
|
||||
public synchronized FileChannel getChannel ()
|
||||
{
|
||||
synchronized (this)
|
||||
{
|
||||
if (ch == null)
|
||||
ch = new FileChannelImpl (fd, false, this);
|
||||
if (ch == null)
|
||||
ch = new FileChannelImpl (fd, false, this);
|
||||
|
||||
return ch;
|
||||
}
|
||||
return ch;
|
||||
}
|
||||
|
||||
} // class FileInputStream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue