BufferedOutputStream.java: Reformated.

2003-03-23  Michael Koch  <konqueror@gmx.de>

	* java/io/BufferedOutputStream.java:
	Reformated.
	* java/io/BufferedReader.java:
	Reformated.
	* java/io/ByteArrayOutputStream.java
	(size): Fixed @see tag.
	* java/io/CharArrayWriter.java
	(size): Fixed @see tag.
	* java/io/DataInput.java:
	Reformated.
	* java/io/DataOutput.java:
	Reformated.
	* java/io/DataOutputStream.java:
	Merged copyright years with classpath.
	* java/io/Externalizable.java:
	Reformated.
	* java/io/FileFilter.java:
	Reformated.
	* java/io/FileInputStream.java:
	Merged copyright years with classpath.
	* java/io/FileOutputStream.java:
	Merged copyright years with classpath.
	* java/io/FilePermission.java
	(FilePermission): Replaced @XXX with FIXME:.
	* java/io/FileWriter.java:
	Reformated.
	* java/io/FilenameFilter.java:
	Reformated.
	* java/io/FilterInputStream.java:
	Reformated.
	* java/io/FilterOutputStream.java:
	Reformated.
	* java/io/FilterReader.java:
	Reformated.
	* java/io/FilterWriter.java:
	Reformated.
	* java/io/LineNumberInputStream.java
	(LineNumberInputStream): Replaced @code with HTML tags to make javadoc
	happy.
	(getLineNumber): Fixed @return tag.
	* java/io/ObjectInput.java:
	Reformated.
	* java/io/ObjectOutput.java:
	Reformated.
	* java/io/ObjectStreamClass.java:
	Reformated.
	* java/io/PrintStream.java:
	Merged copyright years with classpath.
	* java/io/PushbackReader.java
	(PushbackReader): Replaced @code with @param.
	* java/io/SerializablePermission.java:
	Reformated.
	* java/io/StreamTokenizer.java
	(resetSyntax): Fixed @see tag.

From-SVN: r64748
This commit is contained in:
Michael Koch 2003-03-23 19:11:19 +00:00 committed by Michael Koch
parent 4d1da12a32
commit 93b3986a7f
27 changed files with 786 additions and 969 deletions

View file

@ -44,19 +44,19 @@ package java.io;
*/
/**
* This subclass of <code>FilterReader</code> buffers input from an
* underlying implementation to provide a possibly more efficient read
* mechanism. It maintains the buffer and buffer state in instance
* variables that are available to subclasses. The default buffer size
* of 512 chars can be overridden by the creator of the stream.
* <p>
* This class also implements mark/reset functionality. It is capable
* of remembering any number of input chars, to the limits of
* system memory or the size of <code>Integer.MAX_VALUE</code>
*
* @author Per Bothner <bothner@cygnus.com>
* @author Aaron M. Renn <arenn@urbanophile.com>
*/
* This subclass of <code>FilterReader</code> buffers input from an
* underlying implementation to provide a possibly more efficient read
* mechanism. It maintains the buffer and buffer state in instance
* variables that are available to subclasses. The default buffer size
* of 512 chars can be overridden by the creator of the stream.
* <p>
* This class also implements mark/reset functionality. It is capable
* of remembering any number of input chars, to the limits of
* system memory or the size of <code>Integer.MAX_VALUE</code>
*
* @author Per Bothner <bothner@cygnus.com>
* @author Aaron M. Renn <arenn@urbanophile.com>
*/
public class BufferedReader extends Reader
{
Reader in;
@ -99,13 +99,13 @@ public class BufferedReader extends Reader
}
/**
* Create a new <code>BufferedReader</code> that will read from the
* specified subordinate stream with a buffer size that is specified by the
* caller.
*
* @param in The subordinate stream to read from
* @param bufsize The buffer size to use
*/
* Create a new <code>BufferedReader</code> that will read from the
* specified subordinate stream with a buffer size that is specified by the
* caller.
*
* @param in The subordinate stream to read from
* @param bufsize The buffer size to use
*/
public BufferedReader(Reader in, int size)
{
super(in.lock);
@ -114,10 +114,10 @@ public class BufferedReader extends Reader
}
/**
* This method closes the stream
*
* @exception IOException If an error occurs
*/
* This method closes the stream
*
* @exception IOException If an error occurs
*/
public void close() throws IOException
{
synchronized (lock)
@ -130,36 +130,36 @@ public class BufferedReader extends Reader
}
/**
* Returns <code>true</code> to indicate that this class supports mark/reset
* functionality.
*
* @return <code>true</code>
*/
* Returns <code>true</code> to indicate that this class supports mark/reset
* functionality.
*
* @return <code>true</code>
*/
public boolean markSupported()
{
return true;
}
/**
* Mark a position in the input to which the stream can be
* "reset" by calling the <code>reset()</code> method. The parameter
* <code>readlimit</code> is the number of chars that can be read from the
* stream after setting the mark before the mark becomes invalid. For
* example, if <code>mark()</code> is called with a read limit of 10, then
* when 11 chars of data are read from the stream before the
* <code>reset()</code> method is called, then the mark is invalid and the
* stream object instance is not required to remember the mark.
* <p>
* Note that the number of chars that can be remembered by this method
* can be greater than the size of the internal read buffer. It is also
* not dependent on the subordinate stream supporting mark/reset
* functionality.
*
* @param readlimit The number of chars that can be read before the mark
* becomes invalid
*
* @exception IOException If an error occurs
*/
* Mark a position in the input to which the stream can be
* "reset" by calling the <code>reset()</code> method. The parameter
* <code>readlimit</code> is the number of chars that can be read from the
* stream after setting the mark before the mark becomes invalid. For
* example, if <code>mark()</code> is called with a read limit of 10, then
* when 11 chars of data are read from the stream before the
* <code>reset()</code> method is called, then the mark is invalid and the
* stream object instance is not required to remember the mark.
* <p>
* Note that the number of chars that can be remembered by this method
* can be greater than the size of the internal read buffer. It is also
* not dependent on the subordinate stream supporting mark/reset
* functionality.
*
* @param readlimit The number of chars that can be read before the mark
* becomes invalid
*
* @exception IOException If an error occurs
*/
public void mark(int readLimit) throws IOException
{
synchronized (lock)
@ -207,16 +207,16 @@ public class BufferedReader extends Reader
}
/**
* Reset the stream to the point where the <code>mark()</code> method
* was called. Any chars that were read after the mark point was set will
* be re-read during subsequent reads.
* <p>
* This method will throw an IOException if the number of chars read from
* the stream since the call to <code>mark()</code> exceeds the mark limit
* passed when establishing the mark.
*
* @exception IOException If an error occurs;
*/
* Reset the stream to the point where the <code>mark()</code> method
* was called. Any chars that were read after the mark point was set will
* be re-read during subsequent reads.
* <p>
* This method will throw an IOException if the number of chars read from
* the stream since the call to <code>mark()</code> exceeds the mark limit
* passed when establishing the mark.
*
* @exception IOException If an error occurs;
*/
public void reset() throws IOException
{
synchronized (lock)
@ -239,15 +239,15 @@ public class BufferedReader extends Reader
}
/**
* This method determines whether or not a stream is ready to be read. If
* This method returns <code>false</code> then this stream could (but is
* not guaranteed to) block on the next read attempt.
*
* @return <code>true</code> if this stream is ready to be read,
* <code>false</code> otherwise
*
* @exception IOException If an error occurs
*/
* This method determines whether or not a stream is ready to be read. If
* This method returns <code>false</code> then this stream could (but is
* not guaranteed to) block on the next read attempt.
*
* @return <code>true</code> if this stream is ready to be read,
* <code>false</code> otherwise
*
* @exception IOException If an error occurs
*/
public boolean ready() throws IOException
{
synchronized (lock)
@ -258,24 +258,24 @@ public class BufferedReader extends Reader
}
/**
* This method read chars from a stream and stores them into a caller
* supplied buffer. It starts storing the data at index
* <code>offset</code> into
* the buffer and attempts to read <code>len</code> chars. This method can
* return before reading the number of chars requested. The actual number
* of chars read is returned as an int. A -1 is returned to indicate the
* end of the stream.
* <p>
* This method will block until some data can be read.
*
* @param buf The array into which the chars read should be stored
* @param offset The offset into the array to start storing chars
* @param count The requested number of chars to read
*
* @return The actual number of chars read, or -1 if end of stream.
*
* @exception IOException If an error occurs.
*/
* This method read chars from a stream and stores them into a caller
* supplied buffer. It starts storing the data at index
* <code>offset</code> into
* the buffer and attempts to read <code>len</code> chars. This method can
* return before reading the number of chars requested. The actual number
* of chars read is returned as an int. A -1 is returned to indicate the
* end of the stream.
* <p>
* This method will block until some data can be read.
*
* @param buf The array into which the chars read should be stored
* @param offset The offset into the array to start storing chars
* @param count The requested number of chars to read
*
* @return The actual number of chars read, or -1 if end of stream.
*
* @exception IOException If an error occurs.
*/
public int read(char[] buf, int offset, int count) throws IOException
{
synchronized (lock)
@ -396,16 +396,16 @@ public class BufferedReader extends Reader
}
/**
* This method reads a single line of text from the input stream, returning
* it as a <code>String</code>. A line is terminated by "\n", a "\r", or
* an "\r\n" sequence. The system dependent line separator is not used.
* The line termination characters are not returned in the resulting
* <code>String</code>.
*
* @return The line of text read, or <code>null</code> if end of stream.
*
* @exception IOException If an error occurs
*/
* This method reads a single line of text from the input stream, returning
* it as a <code>String</code>. A line is terminated by "\n", a "\r", or
* an "\r\n" sequence. The system dependent line separator is not used.
* The line termination characters are not returned in the resulting
* <code>String</code>.
*
* @return The line of text read, or <code>null</code> if end of stream.
*
* @exception IOException If an error occurs
*/
public String readLine() throws IOException
{
checkStatus();
@ -470,20 +470,20 @@ public class BufferedReader extends Reader
}
/**
* This method skips the specified number of chars in the stream. It
* returns the actual number of chars skipped, which may be less than the
* requested amount.
* <p>
* This method first discards chars in the buffer, then calls the
* <code>skip</code> method on the underlying stream to skip the
* remaining chars.
*
* @param num_chars The requested number of chars to skip
*
* @return The actual number of chars skipped.
*
* @exception IOException If an error occurs
*/
* This method skips the specified number of chars in the stream. It
* returns the actual number of chars skipped, which may be less than the
* requested amount.
* <p>
* This method first discards chars in the buffer, then calls the
* <code>skip</code> method on the underlying stream to skip the
* remaining chars.
*
* @param num_chars The requested number of chars to skip
*
* @return The actual number of chars skipped.
*
* @exception IOException If an error occurs
*/
public long skip(long count) throws IOException
{
synchronized (lock)