diff options
author | Michael Koch <konqueror@gmx.de> | 2003-05-06 10:07:28 +0000 |
---|---|---|
committer | Michael Koch <mkoch@gcc.gnu.org> | 2003-05-06 10:07:28 +0000 |
commit | 83f564f76ff896424c3ac8d6cde45867e9c083c0 (patch) | |
tree | 451228bc753694ff53382b99623580cc39ef00df /libjava/java/io/FileInputStream.java | |
parent | c2e3960284ce035ac43af2525f8ee3fed15ab9b3 (diff) | |
download | gcc-83f564f76ff896424c3ac8d6cde45867e9c083c0.zip gcc-83f564f76ff896424c3ac8d6cde45867e9c083c0.tar.gz gcc-83f564f76ff896424c3ac8d6cde45867e9c083c0.tar.bz2 |
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
Diffstat (limited to 'libjava/java/io/FileInputStream.java')
-rw-r--r-- | libjava/java/io/FileInputStream.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libjava/java/io/FileInputStream.java b/libjava/java/io/FileInputStream.java index b49922e..e22a23a 100644 --- a/libjava/java/io/FileInputStream.java +++ b/libjava/java/io/FileInputStream.java @@ -82,6 +82,7 @@ public class FileInputStream extends InputStream SecurityManager s = System.getSecurityManager(); if (s != null) s.checkRead(name); + fd = new FileDescriptor(name, FileDescriptor.READ); } @@ -268,15 +269,15 @@ public class FileInputStream extends InputStream * * @exception IOException If an error occurs */ - public long skip (long numBytes) throws IOException + public synchronized long skip (long numBytes) throws IOException { if (numBytes < 0) - throw new IllegalArgumentException ( "Can't skip negative bytes: " + - numBytes); + throw new IllegalArgumentException ("Can't skip negative bytes: " + + numBytes); if (numBytes == 0) return 0; - + long curPos = fd.getFilePointer (); long newPos = fd.seek (numBytes, FileDescriptor.CUR, true); return newPos - curPos; |