Commit be06f47b by Michael Koch Committed by Michael Koch

BufferedReader.java, [...]: Fixed javadocs all over.

2004-11-16  Michael Koch  <konqueror@gmx.de>

	* java/io/BufferedReader.java,
	java/io/FileInputStream.java,
	java/io/FileOutputStream.java,
	java/io/FileWriter.java,
	java/io/OutputStreamWriter.java,
	java/io/PipedInputStream.java,
	java/io/PipedOutputStream.java,
	java/io/PipedReader.java,
	java/io/PipedWriter.java,
	java/io/PrintStream.java,
	java/io/PushbackInputStream.java,
	java/io/RandomAccessFile.java,
	java/io/Reader.java,
	java/io/StreamTokenizer.java,
	java/io/StringReader.java,
	java/net/NetworkInterface.java,
	java/net/URLClassLoader.java,
	java/nio/ByteOrder.java,
	java/nio/channels/Channel.java:
	Fixed javadocs all over.

From-SVN: r90727
parent d39289db
2004-11-16 Michael Koch <konqueror@gmx.de>
* java/io/BufferedReader.java,
java/io/FileInputStream.java,
java/io/FileOutputStream.java,
java/io/FileWriter.java,
java/io/OutputStreamWriter.java,
java/io/PipedInputStream.java,
java/io/PipedOutputStream.java,
java/io/PipedReader.java,
java/io/PipedWriter.java,
java/io/PrintStream.java,
java/io/PushbackInputStream.java,
java/io/RandomAccessFile.java,
java/io/Reader.java,
java/io/StreamTokenizer.java,
java/io/StringReader.java,
java/net/NetworkInterface.java,
java/net/URLClassLoader.java,
java/nio/ByteOrder.java,
java/nio/channels/Channel.java:
Fixed javadocs all over.
2004-11-16 Andreas Tobler <a.tobler@schweiz.ch> 2004-11-16 Andreas Tobler <a.tobler@schweiz.ch>
* Makefile.am: Add imported files. * Makefile.am: Add imported files.
......
...@@ -508,7 +508,7 @@ public class BufferedReader extends Reader ...@@ -508,7 +508,7 @@ public class BufferedReader extends Reader
* <code>skip</code> method on the underlying stream to skip the * <code>skip</code> method on the underlying stream to skip the
* remaining chars. * remaining chars.
* *
* @param numChars The requested number of chars to skip * @param count The requested number of chars to skip
* *
* @return The actual number of chars skipped. * @return The actual number of chars skipped.
* *
......
...@@ -122,7 +122,7 @@ public class FileInputStream extends InputStream ...@@ -122,7 +122,7 @@ public class FileInputStream extends InputStream
* An exception is * An exception is
* thrown if reading is not allowed. * thrown if reading is not allowed.
* *
* @param fd The <code>FileDescriptor</code> object this stream * @param fdObj The <code>FileDescriptor</code> object this stream
* should read from * should read from
* *
* @exception SecurityException If read access to the file is not allowed * @exception SecurityException If read access to the file is not allowed
......
...@@ -72,7 +72,7 @@ public class FileOutputStream extends OutputStream ...@@ -72,7 +72,7 @@ public class FileOutputStream extends OutputStream
* one exists) with the name of the file to be opened. An exception is * one exists) with the name of the file to be opened. An exception is
* thrown if writing is not allowed. * thrown if writing is not allowed.
* *
* @param name The name of the file this stream should write to * @param path The name of the file this stream should write to
* @param append <code>true</code> to append bytes to the end of the file, * @param append <code>true</code> to append bytes to the end of the file,
* or <code>false</code> to write bytes to the beginning * or <code>false</code> to write bytes to the beginning
* *
...@@ -95,7 +95,7 @@ public class FileOutputStream extends OutputStream ...@@ -95,7 +95,7 @@ public class FileOutputStream extends OutputStream
* one exists) with the name of the file to be opened. An exception is * one exists) with the name of the file to be opened. An exception is
* thrown if writing is not allowed. * thrown if writing is not allowed.
* *
* @param name The name of the file this stream should write to * @param path The name of the file this stream should write to
* *
* @exception SecurityException If write access to the file is not allowed * @exception SecurityException If write access to the file is not allowed
* @exception FileNotFoundException If a non-security error occurs * @exception FileNotFoundException If a non-security error occurs
...@@ -176,7 +176,7 @@ public class FileOutputStream extends OutputStream ...@@ -176,7 +176,7 @@ public class FileOutputStream extends OutputStream
* one exists) with the specified <code>FileDescriptor</code> as an argument. * one exists) with the specified <code>FileDescriptor</code> as an argument.
* An exception is thrown if writing is not allowed. * An exception is thrown if writing is not allowed.
* *
* @param file The <code>FileDescriptor</code> this stream should write to * @param fdObj The <code>FileDescriptor</code> this stream should write to
* *
* @exception SecurityException If write access to the file is not allowed * @exception SecurityException If write access to the file is not allowed
*/ */
......
/* FileWriter.java -- Convenience class for writing to files. /* FileWriter.java -- Convenience class for writing to files.
Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc. Copyright (C) 1998, 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -49,96 +49,89 @@ package java.io; ...@@ -49,96 +49,89 @@ package java.io;
* <code>OutputStreamWriter</code> to write to it. * <code>OutputStreamWriter</code> to write to it.
* *
* @author Aaron M. Renn (arenn@urbanophile.com) * @author Aaron M. Renn (arenn@urbanophile.com)
* @author Tom Tromey <tromey@cygnus.com> * @author Tom Tromey (tromey@cygnus.com)
*/ */
public class FileWriter extends OutputStreamWriter public class FileWriter extends OutputStreamWriter
{ {
/*
* Constructors
*/
/** /**
* This method initializes a new <code>FileWriter</code> object to write * This method initializes a new <code>FileWriter</code> object to write
* to the specified <code>File</code> object. * to the specified <code>File</code> object.
* *
* @param file The <code>File</code> object to write to. * @param file The <code>File</code> object to write to.
* *
* @param SecurityException If writing to this file is forbidden by the * @throws SecurityException If writing to this file is forbidden by the
* <code>SecurityManager</code>. * <code>SecurityManager</code>.
* @param IOException If any other error occurs * @throws IOException If any other error occurs
*/ */
public FileWriter(File file) throws SecurityException, IOException public FileWriter(File file) throws SecurityException, IOException
{ {
super(new FileOutputStream(file)); super(new FileOutputStream(file));
} }
/** /**
* This method initializes a new <code>FileWriter</code> object to write * This method initializes a new <code>FileWriter</code> object to write
* to the specified <code>File</code> object. * to the specified <code>File</code> object.
* *
* @param file The <code>File</code> object to write to. * @param file The <code>File</code> object to write to.
* @param append <code>true</code> to start adding data at the end of the * @param append <code>true</code> to start adding data at the end of the
* file, <code>false</code> otherwise. * file, <code>false</code> otherwise.
* *
* @param SecurityException If writing to this file is forbidden by the * @throws SecurityException If writing to this file is forbidden by the
* <code>SecurityManager</code>. * <code>SecurityManager</code>.
* @param IOException If any other error occurs * @throws IOException If any other error occurs
*/ */
public FileWriter(File file, boolean append) throws IOException public FileWriter(File file, boolean append) throws IOException
{ {
super(new FileOutputStream(file, append)); super(new FileOutputStream(file, append));
} }
/** /**
* This method initializes a new <code>FileWriter</code> object to write * This method initializes a new <code>FileWriter</code> object to write
* to the specified <code>FileDescriptor</code> object. * to the specified <code>FileDescriptor</code> object.
* *
* @param fd The <code>FileDescriptor</code> object to write to * @param fd The <code>FileDescriptor</code> object to write to
* *
* @param SecurityException If writing to this file is forbidden by the * @throws SecurityException If writing to this file is forbidden by the
* <code>SecurityManager</code>. * <code>SecurityManager</code>.
*/ */
public FileWriter(FileDescriptor fd) throws SecurityException public FileWriter(FileDescriptor fd) throws SecurityException
{ {
super(new FileOutputStream(fd)); super(new FileOutputStream(fd));
} }
/** /**
* This method intializes a new <code>FileWriter</code> object to * This method intializes a new <code>FileWriter</code> object to
* write to the * write to the
* specified named file. * specified named file.
* *
* @param name The name of the file to write to * @param name The name of the file to write to
* *
* @param SecurityException If writing to this file is forbidden by the * @throws SecurityException If writing to this file is forbidden by the
* <code>SecurityManager</code>. * <code>SecurityManager</code>.
* @param IOException If any other error occurs * @throws IOException If any other error occurs
*/ */
public FileWriter(String name) throws IOException public FileWriter(String name) throws IOException
{ {
super(new FileOutputStream(name)); super(new FileOutputStream(name));
} }
/** /**
* This method intializes a new <code>FileWriter</code> object to * This method intializes a new <code>FileWriter</code> object to
* write to the * write to the
* specified named file. This form of the constructor allows the caller * specified named file. This form of the constructor allows the caller
* to determin whether data should be written starting at the beginning or * to determin whether data should be written starting at the beginning or
* the end of the file. * the end of the file.
* *
* @param name The name of the file to write to * @param name The name of the file to write to
* @param append <code>true</code> to start adding data at the end of the * @param append <code>true</code> to start adding data at the end of the
* file, <code>false</code> otherwise. * file, <code>false</code> otherwise.
* *
* @param SecurityException If writing to this file is forbidden by the * @throws SecurityException If writing to this file is forbidden by the
* <code>SecurityManager</code>. * <code>SecurityManager</code>.
* @param IOException If any other error occurs * @throws IOException If any other error occurs
*/ */
public FileWriter(String name, boolean append) throws IOException public FileWriter(String name, boolean append) throws IOException
{ {
super(new FileOutputStream(name, append)); super(new FileOutputStream(name, append));
} }
}
} // class FileWriter
...@@ -287,7 +287,7 @@ public class OutputStreamWriter extends Writer ...@@ -287,7 +287,7 @@ public class OutputStreamWriter extends Writer
/** /**
* This method writes a single character to the output stream. * This method writes a single character to the output stream.
* *
* @param c The char to write, passed as an int. * @param ch The char to write, passed as an int.
* *
* @exception IOException If an error occurs * @exception IOException If an error occurs
*/ */
......
...@@ -151,14 +151,14 @@ public class PipedInputStream extends InputStream ...@@ -151,14 +151,14 @@ public class PipedInputStream extends InputStream
* This method receives a byte of input from the source PipedOutputStream. * This method receives a byte of input from the source PipedOutputStream.
* If the internal circular buffer is full, this method blocks. * If the internal circular buffer is full, this method blocks.
* *
* @param byte_received The byte to write to this stream * @param val The byte to write to this stream
* *
* @exception IOException if error occurs * @exception IOException if error occurs
* @specnote Weird. This method must be some sort of accident. * @specnote Weird. This method must be some sort of accident.
*/ */
protected synchronized void receive(int b) throws IOException protected synchronized void receive(int val) throws IOException
{ {
read_buf[0] = (byte) (b & 0xff); read_buf[0] = (byte) (val & 0xff);
receive (read_buf, 0, 1); receive (read_buf, 0, 1);
} }
...@@ -237,11 +237,7 @@ public class PipedInputStream extends InputStream ...@@ -237,11 +237,7 @@ public class PipedInputStream extends InputStream
* because the end of the stream was reached. If the stream is already * because the end of the stream was reached. If the stream is already
* closed, a -1 will again be returned to indicate the end of the stream. * closed, a -1 will again be returned to indicate the end of the stream.
* <p> * <p>
* This method will block if no bytes are available to be read. * This method will block if no byte is available to be read.
*
* @param buf The buffer into which bytes will be stored
* @param offset The index into the buffer at which to start writing.
* @param len The maximum number of bytes to read.
*/ */
public int read() throws IOException public int read() throws IOException
{ {
...@@ -252,11 +248,7 @@ public class PipedInputStream extends InputStream ...@@ -252,11 +248,7 @@ public class PipedInputStream extends InputStream
// if this method is never called. // if this method is never called.
int r = read(read_buf, 0, 1); int r = read(read_buf, 0, 1);
return r != -1 ? read_buf[0] : -1;
if (r == -1)
return -1;
else
return read_buf[0];
} }
/** /**
......
...@@ -129,21 +129,21 @@ public class PipedOutputStream extends OutputStream ...@@ -129,21 +129,21 @@ public class PipedOutputStream extends OutputStream
* <code>PipedInputStream</code> to which this object is connected has * <code>PipedInputStream</code> to which this object is connected has
* a buffer that cannot hold all of the bytes to be written. * a buffer that cannot hold all of the bytes to be written.
* *
* @param buf The array containing bytes to write to the stream. * @param buffer The array containing bytes to write to the stream.
* @param offset The index into the array to start writing bytes from. * @param offset The index into the array to start writing bytes from.
* @param len The number of bytes to write. * @param len The number of bytes to write.
* *
* @exception IOException If the stream has not been connected or has * @exception IOException If the stream has not been connected or has
* been closed. * been closed.
*/ */
public void write(byte[] b, int off, int len) throws IOException public void write(byte[] buffer, int offset, int len) throws IOException
{ {
if (sink == null) if (sink == null)
throw new IOException ("Not connected"); throw new IOException ("Not connected");
if (closed) if (closed)
throw new IOException ("Pipe closed"); throw new IOException ("Pipe closed");
sink.receive (b, off, len); sink.receive(buffer, offset, len);
} }
/** /**
......
...@@ -123,7 +123,7 @@ public class PipedReader extends Reader ...@@ -123,7 +123,7 @@ public class PipedReader extends Reader
* This stream is then ready for reading. If this stream is already * This stream is then ready for reading. If this stream is already
* connected or has been previously closed, then an exception is thrown * connected or has been previously closed, then an exception is thrown
* *
* @param src The <code>PipedWriter</code> to connect this stream to * @param source The <code>PipedWriter</code> to connect this stream to
* *
* @exception IOException If this PipedReader or <code>source</code> * @exception IOException If this PipedReader or <code>source</code>
* has been connected already. * has been connected already.
...@@ -218,11 +218,7 @@ public class PipedReader extends Reader ...@@ -218,11 +218,7 @@ public class PipedReader extends Reader
* because the end of the stream was reached. If the stream is already * because the end of the stream was reached. If the stream is already
* closed, a -1 will again be returned to indicate the end of the stream. * closed, a -1 will again be returned to indicate the end of the stream.
* <p> * <p>
* This method will block if no chars are available to be read. * This method will block if no char is available to be read.
*
* @param buf The buffer into which chars will be stored
* @param offset The index into the buffer at which to start writing.
* @param len The maximum number of chars to read.
*/ */
public int read() throws IOException public int read() throws IOException
{ {
...@@ -233,11 +229,7 @@ public class PipedReader extends Reader ...@@ -233,11 +229,7 @@ public class PipedReader extends Reader
// if this method is never called. // if this method is never called.
int r = read(read_buf, 0, 1); int r = read(read_buf, 0, 1);
return r != -1 ? read_buf[0] : -1;
if (r == -1)
return -1;
else
return read_buf[0];
} }
/** /**
......
...@@ -128,21 +128,21 @@ public class PipedWriter extends Writer ...@@ -128,21 +128,21 @@ public class PipedWriter extends Writer
* <code>PipedReader</code> to which this object is connected has * <code>PipedReader</code> to which this object is connected has
* a buffer that cannot hold all of the chars to be written. * a buffer that cannot hold all of the chars to be written.
* *
* @param buf The array containing chars to write to the stream. * @param buffer The array containing chars to write to the stream.
* @param offset The index into the array to start writing chars from. * @param offset The index into the array to start writing chars from.
* @param len The number of chars to write. * @param len The number of chars to write.
* *
* @exception IOException If the stream has not been connected or has * @exception IOException If the stream has not been connected or has
* been closed. * been closed.
*/ */
public void write(char[] b, int off, int len) throws IOException public void write(char[] buffer, int offset, int len) throws IOException
{ {
if (sink == null) if (sink == null)
throw new IOException ("Not connected"); throw new IOException ("Not connected");
if (closed) if (closed)
throw new IOException ("Pipe closed"); throw new IOException ("Pipe closed");
sink.receive (b, off, len); sink.receive(buffer, offset, len);
} }
/** /**
......
...@@ -279,7 +279,7 @@ public class PrintStream extends FilterOutputStream ...@@ -279,7 +279,7 @@ public class PrintStream extends FilterOutputStream
* values are printed as "true" and <code>false</code> values are printed * values are printed as "true" and <code>false</code> values are printed
* as "false". * as "false".
* *
* @param b The <code>boolean</code> value to print * @param bool The <code>boolean</code> value to print
*/ */
public void print (boolean bool) public void print (boolean bool)
{ {
...@@ -369,7 +369,7 @@ public class PrintStream extends FilterOutputStream ...@@ -369,7 +369,7 @@ public class PrintStream extends FilterOutputStream
* This method prints an array of characters to the stream. The actual * This method prints an array of characters to the stream. The actual
* value printed depends on the system default encoding. * value printed depends on the system default encoding.
* *
* @param s The array of characters to print. * @param charArray The array of characters to print.
*/ */
public void print (char[] charArray) public void print (char[] charArray)
{ {
...@@ -393,7 +393,7 @@ public class PrintStream extends FilterOutputStream ...@@ -393,7 +393,7 @@ public class PrintStream extends FilterOutputStream
* <p> * <p>
* This method prints a line termination sequence after printing the value. * This method prints a line termination sequence after printing the value.
* *
* @param b The <code>boolean</code> value to print * @param bool The <code>boolean</code> value to print
*/ */
public void println (boolean bool) public void println (boolean bool)
{ {
...@@ -499,7 +499,7 @@ public class PrintStream extends FilterOutputStream ...@@ -499,7 +499,7 @@ public class PrintStream extends FilterOutputStream
* <p> * <p>
* This method prints a line termination sequence after printing the value. * This method prints a line termination sequence after printing the value.
* *
* @param s The array of characters to print. * @param charArray The array of characters to print.
*/ */
public void println (char[] charArray) public void println (char[] charArray)
{ {
...@@ -511,7 +511,7 @@ public class PrintStream extends FilterOutputStream ...@@ -511,7 +511,7 @@ public class PrintStream extends FilterOutputStream
* enabled, printing a newline character will cause the stream to be * enabled, printing a newline character will cause the stream to be
* flushed after the character is written. * flushed after the character is written.
* *
* @param b The byte to be written * @param oneByte The byte to be written
*/ */
public void write (int oneByte) public void write (int oneByte)
{ {
......
...@@ -302,7 +302,7 @@ public class PushbackInputStream extends FilterInputStream ...@@ -302,7 +302,7 @@ public class PushbackInputStream extends FilterInputStream
* <code>skip</code> method on the underlying <code>InputStream</code> to * <code>skip</code> method on the underlying <code>InputStream</code> to
* skip additional bytes if necessary. * skip additional bytes if necessary.
* *
* @param numBytes The requested number of bytes to skip * @param n The requested number of bytes to skip
* *
* @return The actual number of bytes skipped. * @return The actual number of bytes skipped.
* *
......
...@@ -103,7 +103,7 @@ public abstract class Reader ...@@ -103,7 +103,7 @@ public abstract class Reader
* *
* @param buf The array into which the chars read should be stored * @param buf The array into which the chars read should be stored
* @param offset The offset into the array to start storing chars * @param offset The offset into the array to start storing chars
* @param len The requested number of chars to read * @param count The requested number of chars to read
* *
* @return The actual number of chars read, or -1 if end of stream. * @return The actual number of chars read, or -1 if end of stream.
* *
...@@ -189,7 +189,7 @@ public abstract class Reader ...@@ -189,7 +189,7 @@ public abstract class Reader
* <code>reset()</code> method is called, then the mark is invalid and the * <code>reset()</code> method is called, then the mark is invalid and the
* stream object instance is not required to remember the mark. * stream object instance is not required to remember the mark.
* *
* @param readlimit The number of chars that can be read before the mark * @param readLimit The number of chars that can be read before the mark
* becomes invalid * becomes invalid
* *
* @exception IOException If an error occurs such as mark not being * @exception IOException If an error occurs such as mark not being
...@@ -243,7 +243,7 @@ public abstract class Reader ...@@ -243,7 +243,7 @@ public abstract class Reader
* override this method to provide a more efficient implementation where * override this method to provide a more efficient implementation where
* one exists. * one exists.
* *
* @param num_chars The requested number of chars to skip * @param count The requested number of chars to skip
* *
* @return The actual number of chars skipped. * @return The actual number of chars skipped.
* *
......
...@@ -122,7 +122,7 @@ public class StreamTokenizer ...@@ -122,7 +122,7 @@ public class StreamTokenizer
* them. For details on how this method operates by default, see * them. For details on how this method operates by default, see
* <code>StreamTokenizer(Reader)</code>. * <code>StreamTokenizer(Reader)</code>.
* *
* @param in The <code>InputStream</code> to read from * @param is The <code>InputStream</code> to read from
* *
* @deprecated Since JDK 1.1. * @deprecated Since JDK 1.1.
*/ */
...@@ -150,7 +150,7 @@ public class StreamTokenizer ...@@ -150,7 +150,7 @@ public class StreamTokenizer
* <li>C and C++ (//) comments are not recognized</li> * <li>C and C++ (//) comments are not recognized</li>
* </ul> * </ul>
* *
* @param in The <code>Reader</code> to read chars from * @param r The <code>Reader</code> to read chars from
*/ */
public StreamTokenizer(Reader r) public StreamTokenizer(Reader r)
{ {
...@@ -170,7 +170,7 @@ public class StreamTokenizer ...@@ -170,7 +170,7 @@ public class StreamTokenizer
* This method sets the comment attribute on the specified * This method sets the comment attribute on the specified
* character. Other attributes for the character are cleared. * character. Other attributes for the character are cleared.
* *
* @param c The character to set the comment attribute for, passed as an int * @param ch The character to set the comment attribute for, passed as an int
*/ */
public void commentChar(int ch) public void commentChar(int ch)
{ {
...@@ -517,7 +517,7 @@ public class StreamTokenizer ...@@ -517,7 +517,7 @@ public class StreamTokenizer
* quote, or comment) will be set on this character. This character will * quote, or comment) will be set on this character. This character will
* parse as its own token. * parse as its own token.
* *
* @param c The character to make ordinary, passed as an int * @param ch The character to make ordinary, passed as an int
*/ */
public void ordinaryChar(int ch) public void ordinaryChar(int ch)
{ {
...@@ -533,9 +533,9 @@ public class StreamTokenizer ...@@ -533,9 +533,9 @@ public class StreamTokenizer
* range parse as its own token. * range parse as its own token.
* *
* @param low The low end of the range of values to set the whitespace * @param low The low end of the range of values to set the whitespace
* attribute for * attribute for
* @param high The high end of the range of values to set the whitespace * @param hi The high end of the range of values to set the whitespace
* attribute for * attribute for
*/ */
public void ordinaryChars(int low, int hi) public void ordinaryChars(int low, int hi)
{ {
...@@ -575,7 +575,7 @@ public class StreamTokenizer ...@@ -575,7 +575,7 @@ public class StreamTokenizer
* This method sets the quote attribute on the specified character. * This method sets the quote attribute on the specified character.
* Other attributes for the character are cleared. * Other attributes for the character are cleared.
* *
* @param c The character to set the quote attribute for, passed as an int. * @param ch The character to set the quote attribute for, passed as an int.
*/ */
public void quoteChar(int ch) public void quoteChar(int ch)
{ {
...@@ -670,9 +670,9 @@ public class StreamTokenizer ...@@ -670,9 +670,9 @@ public class StreamTokenizer
* specified range, range terminators included. * specified range, range terminators included.
* *
* @param low The low end of the range of values to set the whitespace * @param low The low end of the range of values to set the whitespace
* attribute for * attribute for
* @param high The high end of the range of values to set the whitespace * @param hi The high end of the range of values to set the whitespace
* attribute for * attribute for
*/ */
public void whitespaceChars(int low, int hi) public void whitespaceChars(int low, int hi)
{ {
...@@ -692,9 +692,9 @@ public class StreamTokenizer ...@@ -692,9 +692,9 @@ public class StreamTokenizer
* specified range, range terminators included. * specified range, range terminators included.
* *
* @param low The low end of the range of values to set the alphabetic * @param low The low end of the range of values to set the alphabetic
* attribute for * attribute for
* @param high The high end of the range of values to set the alphabetic * @param hi The high end of the range of values to set the alphabetic
* attribute for * attribute for
*/ */
public void wordChars(int low, int hi) public void wordChars(int low, int hi)
{ {
......
...@@ -52,7 +52,7 @@ package java.io; ...@@ -52,7 +52,7 @@ package java.io;
* method rewinds the read pointer to the beginning of the <code>String</code>. * method rewinds the read pointer to the beginning of the <code>String</code>.
* *
* @author Aaron M. Renn (arenn@urbanophile.com) * @author Aaron M. Renn (arenn@urbanophile.com)
* @author Warren Levy <warrenl@cygnus.com> * @author Warren Levy (warrenl@cygnus.com)
* @date October 19, 1998. * @date October 19, 1998.
*/ */
public class StringReader extends Reader public class StringReader extends Reader
...@@ -74,7 +74,7 @@ public class StringReader extends Reader ...@@ -74,7 +74,7 @@ public class StringReader extends Reader
* passed in <code>String</code>. This stream will read from the beginning * passed in <code>String</code>. This stream will read from the beginning
* to the end of the <code>String</code>. * to the end of the <code>String</code>.
* *
* @param s The <code>String</code> this stream will read from. * @param buffer The <code>String</code> this stream will read from.
*/ */
public StringReader(String buffer) public StringReader(String buffer)
{ {
...@@ -185,7 +185,7 @@ public class StringReader extends Reader ...@@ -185,7 +185,7 @@ public class StringReader extends Reader
* buffer, then only enough chars are skipped to position the stream at * buffer, then only enough chars are skipped to position the stream at
* the end of the buffer. The actual number of chars skipped is returned. * the end of the buffer. The actual number of chars skipped is returned.
* *
* @param num_chars The requested number of chars to skip * @param n The requested number of chars to skip
* *
* @return The actual number of chars skipped. * @return The actual number of chars skipped.
*/ */
......
/* NetworkInterface.java -- /* NetworkInterface.java --
Copyright (C) 2002, 2003 Free Software Foundation, Inc. Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -85,14 +85,14 @@ public final class NetworkInterface ...@@ -85,14 +85,14 @@ public final class NetworkInterface
} }
/** /**
* Returns all available addresses of the network interface * Returns all available addresses of the network interface
* *
* If a @see SecurityManager is available all addresses are checked * If a @see SecurityManager is available all addresses are checked
* with @see SecurityManager::checkConnect() if they are available. * with @see SecurityManager::checkConnect() if they are available.
* Only <code>InetAddresses</code> are returned where the security manager * Only <code>InetAddresses</code> are returned where the security manager
* doesn't throw an exception. * doesn't throw an exception.
* *
* @return An enumeration of all addresses. * @return An enumeration of all addresses.
*/ */
public Enumeration getInetAddresses() public Enumeration getInetAddresses()
{ {
...@@ -122,9 +122,9 @@ public final class NetworkInterface ...@@ -122,9 +122,9 @@ public final class NetworkInterface
} }
/** /**
* Returns the display name of the interface * Returns the display name of the interface
* *
* @return The display name of the interface * @return The display name of the interface
*/ */
public String getDisplayName() public String getDisplayName()
{ {
...@@ -160,12 +160,14 @@ public final class NetworkInterface ...@@ -160,12 +160,14 @@ public final class NetworkInterface
} }
/** /**
* Return a network interface by its address * Return a network interface by its address
* *
* @param addr The address of the interface to return * @param addr The address of the interface to return
* *
* @exception SocketException If an error occurs * @return the interface, or <code>null</code> if none found
* @exception NullPointerException If the specified addess is null *
* @exception SocketException If an error occurs
* @exception NullPointerException If the specified addess is null
*/ */
public static NetworkInterface getByInetAddress(InetAddress addr) public static NetworkInterface getByInetAddress(InetAddress addr)
throws SocketException throws SocketException
...@@ -189,9 +191,11 @@ public final class NetworkInterface ...@@ -189,9 +191,11 @@ public final class NetworkInterface
} }
/** /**
* Return an <code>Enumeration</code> of all available network interfaces * Return an <code>Enumeration</code> of all available network interfaces
* *
* @exception SocketException If an error occurs * @return all interfaces
*
* @exception SocketException If an error occurs
*/ */
public static Enumeration getNetworkInterfaces() throws SocketException public static Enumeration getNetworkInterfaces() throws SocketException
{ {
...@@ -204,9 +208,11 @@ public final class NetworkInterface ...@@ -204,9 +208,11 @@ public final class NetworkInterface
} }
/** /**
* Checks if the current instance is equal to obj * Checks if the current instance is equal to obj
* *
* @param obj The object to compare with * @param obj The object to compare with
*
* @return <code>true</code> if equal, <code>false<code> otherwise
*/ */
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
...@@ -219,7 +225,9 @@ public final class NetworkInterface ...@@ -219,7 +225,9 @@ public final class NetworkInterface
} }
/** /**
* Returns the hashcode of the current instance * Returns the hashcode of the current instance
*
* @return the hashcode
*/ */
public int hashCode() public int hashCode()
{ {
...@@ -228,7 +236,9 @@ public final class NetworkInterface ...@@ -228,7 +236,9 @@ public final class NetworkInterface
} }
/** /**
* Returns a string representation of the interface * Returns a string representation of the interface
*
* @return the string
*/ */
public String toString() public String toString()
{ {
...@@ -248,4 +258,4 @@ public final class NetworkInterface ...@@ -248,4 +258,4 @@ public final class NetworkInterface
return result; return result;
} }
} // class NetworkInterface }
...@@ -1097,6 +1097,8 @@ public class URLClassLoader extends SecureClassLoader ...@@ -1097,6 +1097,8 @@ public class URLClassLoader extends SecureClassLoader
* @param urls the initial URLs used to resolve classes and * @param urls the initial URLs used to resolve classes and
* resources * resources
* *
* @return the class loader
*
* @exception SecurityException when the calling code does not have * @exception SecurityException when the calling code does not have
* permission to access the given <code>URL</code>s * permission to access the given <code>URL</code>s
*/ */
...@@ -1115,6 +1117,8 @@ public class URLClassLoader extends SecureClassLoader ...@@ -1115,6 +1117,8 @@ public class URLClassLoader extends SecureClassLoader
* resources * resources
* @param parent the parent class loader * @param parent the parent class loader
* *
* @return the class loader
*
* @exception SecurityException when the calling code does not have * @exception SecurityException when the calling code does not have
* permission to access the given <code>URL</code>s * permission to access the given <code>URL</code>s
*/ */
......
/* ByteOrder.java -- /* ByteOrder.java --
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -39,16 +39,25 @@ exception statement from your version. */ ...@@ -39,16 +39,25 @@ exception statement from your version. */
package java.nio; package java.nio;
/** /**
* @author Michael Koch * @author Michael Koch (konqueror@gmx.de)
* @since 1.4 * @since 1.4
*/ */
public final class ByteOrder public final class ByteOrder
{ {
/**
* Constant indicating big endian byte order.
*/
public static final ByteOrder BIG_ENDIAN = new ByteOrder(); public static final ByteOrder BIG_ENDIAN = new ByteOrder();
public static final ByteOrder LITTLE_ENDIAN = new ByteOrder();
/**
* Constant indicating little endian byte order.
*/
public static final ByteOrder LITTLE_ENDIAN = new ByteOrder();
/** /**
* Returns the native byte order of the platform currently running. * Returns the native byte order of the platform currently running.
*
* @return the native byte order
*/ */
public static ByteOrder nativeOrder() public static ByteOrder nativeOrder()
{ {
...@@ -58,6 +67,8 @@ public final class ByteOrder ...@@ -58,6 +67,8 @@ public final class ByteOrder
/** /**
* Returns a string representation of the byte order. * Returns a string representation of the byte order.
*
* @return the string
*/ */
public String toString() public String toString()
{ {
......
/* Channel.java -- /* Channel.java --
Copyright (C) 2002 Free Software Foundation, Inc. Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -35,15 +35,18 @@ this exception to your version of the library, but you are not ...@@ -35,15 +35,18 @@ this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this obligated to do so. If you do not wish to do so, delete this
exception statement from your version. */ exception statement from your version. */
package java.nio.channels; package java.nio.channels;
import java.io.IOException; import java.io.IOException;
public interface Channel public interface Channel
{ {
/** /**
* Tells whether this channel is open or not * Tells whether this channel is open or not
*
* @return <code>true</code>if channel is open,
* </code>false</code> otherwise
*/ */
boolean isOpen(); boolean isOpen();
......
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