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
This commit is contained in:
parent
c2e3960284
commit
83f564f76f
6 changed files with 304 additions and 98 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue