Commit c93aa804 by Michael Koch Committed by Michael Koch

DataInputStream.java: Reformatted, Replaced < and & with html entitites in documentation.

2003-05-20  Michael Koch  <konqueror@gmx.de>

	* java/io/DataInputStream.java:
	Reformatted, Replaced < and & with html entitites in documentation.
	* java/io/File.java:
	Reformatted.
	* java/io/PrintWriter.java:
	Moved class documentation.

From-SVN: r66992
parent c2a40660
2003-05-20 Michael Koch <konqueror@gmx.de> 2003-05-20 Michael Koch <konqueror@gmx.de>
* java/io/DataInputStream.java:
Reformatted, Replaced < and & with html entitites in documentation.
* java/io/File.java:
Reformatted.
* java/io/PrintWriter.java:
Moved class documentation.
2003-05-20 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/ByteBufferImpl.java, * gnu/java/nio/ByteBufferImpl.java,
gnu/java/nio/CharBufferImpl.java, gnu/java/nio/CharBufferImpl.java,
gnu/java/nio/CharViewBufferImpl.java, gnu/java/nio/CharViewBufferImpl.java,
......
...@@ -151,7 +151,7 @@ public class File implements Serializable, Comparable ...@@ -151,7 +151,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean canRead () public boolean canRead ()
{ {
checkRead(); checkRead ();
return _access (READ); return _access (READ);
} }
...@@ -171,7 +171,7 @@ public class File implements Serializable, Comparable ...@@ -171,7 +171,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean canWrite () public boolean canWrite ()
{ {
checkWrite(); checkWrite ();
return _access (WRITE); return _access (WRITE);
} }
...@@ -196,7 +196,7 @@ public class File implements Serializable, Comparable ...@@ -196,7 +196,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean createNewFile() throws IOException public boolean createNewFile() throws IOException
{ {
checkWrite(); checkWrite ();
return performCreate(); return performCreate();
} }
...@@ -261,7 +261,7 @@ public class File implements Serializable, Comparable ...@@ -261,7 +261,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean exists () public boolean exists ()
{ {
checkRead(); checkRead ();
return _access (EXISTS); return _access (EXISTS);
} }
...@@ -637,7 +637,7 @@ public class File implements Serializable, Comparable ...@@ -637,7 +637,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean isDirectory () public boolean isDirectory ()
{ {
checkRead(); checkRead ();
return _stat (DIRECTORY); return _stat (DIRECTORY);
} }
...@@ -653,7 +653,7 @@ public class File implements Serializable, Comparable ...@@ -653,7 +653,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean isFile () public boolean isFile ()
{ {
checkRead(); checkRead ();
return _stat (ISFILE); return _stat (ISFILE);
} }
...@@ -670,7 +670,7 @@ public class File implements Serializable, Comparable ...@@ -670,7 +670,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean isHidden () public boolean isHidden ()
{ {
checkRead(); checkRead ();
return _stat (ISHIDDEN); return _stat (ISHIDDEN);
} }
...@@ -689,7 +689,7 @@ public class File implements Serializable, Comparable ...@@ -689,7 +689,7 @@ public class File implements Serializable, Comparable
*/ */
public long lastModified () public long lastModified ()
{ {
checkRead(); checkRead ();
return attr (MODIFIED); return attr (MODIFIED);
} }
...@@ -703,7 +703,7 @@ public class File implements Serializable, Comparable ...@@ -703,7 +703,7 @@ public class File implements Serializable, Comparable
*/ */
public long length () public long length ()
{ {
checkRead(); checkRead ();
return attr (LENGTH); return attr (LENGTH);
} }
...@@ -745,7 +745,7 @@ public class File implements Serializable, Comparable ...@@ -745,7 +745,7 @@ public class File implements Serializable, Comparable
*/ */
public String[] list (FilenameFilter filter) public String[] list (FilenameFilter filter)
{ {
checkRead(); checkRead ();
return (String[]) performList (filter, null, String.class); return (String[]) performList (filter, null, String.class);
} }
...@@ -769,7 +769,7 @@ public class File implements Serializable, Comparable ...@@ -769,7 +769,7 @@ public class File implements Serializable, Comparable
*/ */
public String[] list () public String[] list ()
{ {
checkRead(); checkRead ();
return (String[]) performList (null, null, String.class); return (String[]) performList (null, null, String.class);
} }
...@@ -793,7 +793,7 @@ public class File implements Serializable, Comparable ...@@ -793,7 +793,7 @@ public class File implements Serializable, Comparable
*/ */
public File[] listFiles () public File[] listFiles ()
{ {
checkRead(); checkRead ();
return (File[]) performList (null, null, File.class); return (File[]) performList (null, null, File.class);
} }
...@@ -823,7 +823,7 @@ public class File implements Serializable, Comparable ...@@ -823,7 +823,7 @@ public class File implements Serializable, Comparable
*/ */
public File[] listFiles (FilenameFilter filter) public File[] listFiles (FilenameFilter filter)
{ {
checkRead(); checkRead ();
return (File[]) performList (filter, null, File.class); return (File[]) performList (filter, null, File.class);
} }
...@@ -853,7 +853,7 @@ public class File implements Serializable, Comparable ...@@ -853,7 +853,7 @@ public class File implements Serializable, Comparable
*/ */
public File[] listFiles (FileFilter filter) public File[] listFiles (FileFilter filter)
{ {
checkRead(); checkRead ();
return (File[]) performList (null, filter, File.class); return (File[]) performList (null, filter, File.class);
} }
...@@ -905,7 +905,7 @@ public class File implements Serializable, Comparable ...@@ -905,7 +905,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean mkdir () public boolean mkdir ()
{ {
checkWrite(); checkWrite ();
return performMkdir (); return performMkdir ();
} }
...@@ -936,7 +936,7 @@ public class File implements Serializable, Comparable ...@@ -936,7 +936,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean mkdirs () public boolean mkdirs ()
{ {
checkWrite(); checkWrite ();
if (isDirectory ()) if (isDirectory ())
return false; return false;
return mkdirs (new File (path)); return mkdirs (new File (path));
...@@ -987,20 +987,21 @@ public class File implements Serializable, Comparable ...@@ -987,20 +987,21 @@ public class File implements Serializable, Comparable
String dirname = tmpdir; String dirname = tmpdir;
if (dirname == null) if (dirname == null)
throw throw
new IOException("Cannot determine system temporary directory"); new IOException ("Cannot determine system temporary directory");
directory = new File(dirname); directory = new File (dirname);
if (!directory.exists()) if (!directory.exists ())
throw new IOException("System temporary directory " throw new IOException ("System temporary directory "
+ directory.getName() + " does not exist."); + directory.getName() + " does not exist.");
if (!directory.isDirectory()) if (!directory.isDirectory())
throw new IOException("System temporary directory " throw new IOException ("System temporary directory "
+ directory.getName() + directory.getName()
+ " is not really a directory."); + " is not really a directory.");
} }
if (prefix.length () < 3) if (prefix.length () < 3)
throw new IllegalArgumentException ("Prefix too short: " + prefix); throw new IllegalArgumentException ("Prefix too short: " + prefix);
if (suffix == null) if (suffix == null)
suffix = ".tmp"; suffix = ".tmp";
...@@ -1059,7 +1060,7 @@ public class File implements Serializable, Comparable ...@@ -1059,7 +1060,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean setReadOnly () public boolean setReadOnly ()
{ {
checkWrite(); checkWrite ();
return performSetReadOnly(); return performSetReadOnly();
} }
...@@ -1089,7 +1090,7 @@ public class File implements Serializable, Comparable ...@@ -1089,7 +1090,7 @@ public class File implements Serializable, Comparable
{ {
try try
{ {
s.checkRead(roots[i].path); s.checkRead (roots[i].path);
} }
catch (SecurityException sx) catch (SecurityException sx)
{ {
...@@ -1220,8 +1221,8 @@ public class File implements Serializable, Comparable ...@@ -1220,8 +1221,8 @@ public class File implements Serializable, Comparable
String dname = dest.getName(); String dname = dest.getName();
if (s != null) if (s != null)
{ {
s.checkWrite(sname); s.checkWrite (sname);
s.checkWrite(dname); s.checkWrite (dname);
} }
return performRenameTo (dest); return performRenameTo (dest);
} }
...@@ -1249,7 +1250,7 @@ public class File implements Serializable, Comparable ...@@ -1249,7 +1250,7 @@ public class File implements Serializable, Comparable
*/ */
public boolean setLastModified (long time) public boolean setLastModified (long time)
{ {
checkWrite(); checkWrite ();
return performSetLastModified(time); return performSetLastModified(time);
} }
...@@ -1272,11 +1273,11 @@ public class File implements Serializable, Comparable ...@@ -1272,11 +1273,11 @@ public class File implements Serializable, Comparable
} }
/** /**
* Add this File to the set of files to be deleted upon normal * Add this File to the set of files to be deleted upon normal
* termination. * termination.
* *
* @since 1.2 * @since 1.2
*/ */
// FIXME: This should use the ShutdownHook API once we implement that. // FIXME: This should use the ShutdownHook API once we implement that.
public void deleteOnExit () public void deleteOnExit ()
{ {
......
...@@ -37,27 +37,27 @@ exception statement from your version. */ ...@@ -37,27 +37,27 @@ exception statement from your version. */
package java.io; package java.io;
/**
* This class prints Java primitive values and objects to a stream as
* text. None of the methods in this class throw an exception. However,
* errors can be detected by calling the <code>checkError()</code> method.
* Additionally, this stream can be designated as "autoflush" when
* created so that any writes are automatically flushed to the underlying
* output sink whenever one of the <code>println</code> methods is
* called. (Note that this differs from the <code>PrintStream</code>
* class which also auto-flushes when it encounters a newline character
* in the chars written).
*
* @author Per Bothner <bothner@cygnus.com>
* @author Aaron M. Renn (arenn@urbanophile.com)
* @date April 17, 1998.
*/
/* Written using "Java Class Libraries", 2nd edition, plus online /* Written using "Java Class Libraries", 2nd edition, plus online
* API docs for JDK 1.2 beta from http://www.javasoft.com. * API docs for JDK 1.2 beta from http://www.javasoft.com.
* Status: Believed complete and correct. * Status: Believed complete and correct.
* However, should use native methods for conversion. * However, should use native methods for conversion.
*/ */
/**
* This class prints Java primitive values and objects to a stream as
* text. None of the methods in this class throw an exception. However,
* errors can be detected by calling the <code>checkError()</code> method.
* Additionally, this stream can be designated as "autoflush" when
* created so that any writes are automatically flushed to the underlying
* output sink whenever one of the <code>println</code> methods is
* called. (Note that this differs from the <code>PrintStream</code>
* class which also auto-flushes when it encounters a newline character
* in the chars written).
*
* @author Per Bothner <bothner@cygnus.com>
* @author Aaron M. Renn <arenn@urbanophile.com>
* @date April 17, 1998.
*/
public class PrintWriter extends Writer public class PrintWriter extends Writer
{ {
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment