aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/nio/channels/Channels.java
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2004-04-20 15:27:38 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2004-04-20 15:27:38 +0000
commit92e1fe674851eff331db253bcb79199716a341f6 (patch)
tree9914edd6a6325b7030a0b0da34b29e407a5403e4 /libjava/java/nio/channels/Channels.java
parent08c5d75719821940cc39591681aaec3c7fdc63ce (diff)
downloadgcc-92e1fe674851eff331db253bcb79199716a341f6.zip
gcc-92e1fe674851eff331db253bcb79199716a341f6.tar.gz
gcc-92e1fe674851eff331db253bcb79199716a341f6.tar.bz2
Buffer.java, [...]: Fixed javadocs and jalopied all over java.nio.
2004-04-20 Michael Koch <konqueror@gmx.de> * java/nio/Buffer.java, java/nio/channels/AlreadyConnectedException.java, java/nio/channels/AsynchronousCloseException.java, java/nio/channels/ByteChannel.java, java/nio/channels/CancelledKeyException.java, java/nio/channels/Channel.java, java/nio/channels/Channels.java, java/nio/channels/ClosedByInterruptException.java, java/nio/channels/ClosedChannelException.java, java/nio/channels/ClosedSelectorException.java, java/nio/channels/ConnectionPendingException.java, java/nio/channels/DatagramChannel.java, java/nio/channels/FileChannel.java, java/nio/channels/FileLock.java, java/nio/channels/FileLockInterruptionException.java, java/nio/channels/GatheringByteChannel.java, java/nio/channels/IllegalBlockingModeException.java, java/nio/channels/IllegalSelectorException.java, java/nio/channels/InterruptibleChannel.java, java/nio/channels/NoConnectionPendingException.java, java/nio/channels/NonReadableChannelException.java, java/nio/channels/NonWritableChannelException.java, java/nio/channels/NotYetBoundException.java, java/nio/channels/NotYetConnectedException.java, java/nio/channels/OverlappingFileLockException.java, java/nio/channels/Pipe.java, java/nio/channels/ReadableByteChannel.java, java/nio/channels/ScatteringByteChannel.java, java/nio/channels/SelectableChannel.java, java/nio/channels/SelectionKey.java, java/nio/channels/Selector.java, java/nio/channels/ServerSocketChannel.java, java/nio/channels/SocketChannel.java, java/nio/channels/UnresolvedAddressException.java, java/nio/channels/UnsupportedAddressTypeException.java, java/nio/channels/WritableByteChannel.java, java/nio/channels/spi/AbstractInterruptibleChannel.java, java/nio/channels/spi/AbstractSelectableChannel.java, java/nio/channels/spi/AbstractSelectionKey.java, java/nio/channels/spi/AbstractSelector.java, java/nio/channels/spi/SelectorProvider.java, java/nio/charset/spi/CharsetProvider.java: Fixed javadocs and jalopied all over java.nio. From-SVN: r80909
Diffstat (limited to 'libjava/java/nio/channels/Channels.java')
-rw-r--r--libjava/java/nio/channels/Channels.java33
1 files changed, 17 insertions, 16 deletions
diff --git a/libjava/java/nio/channels/Channels.java b/libjava/java/nio/channels/Channels.java
index 896e173..20ef50d 100644
--- a/libjava/java/nio/channels/Channels.java
+++ b/libjava/java/nio/channels/Channels.java
@@ -1,4 +1,4 @@
-/* Channels.java --
+/* Channels.java --
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -42,20 +42,21 @@ import gnu.java.nio.ChannelOutputStream;
import gnu.java.nio.InputStreamChannel;
import gnu.java.nio.OutputStreamChannel;
import gnu.java.nio.channels.FileChannelImpl;
-import java.io.InputStream;
-import java.io.OutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
import java.io.Reader;
import java.io.Writer;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.CharsetEncoder;
+
/**
* @since 1.4
*/
-public final class Channels
+public final class Channels
{
/**
* Constructs a stream that reads bytes from the given channel.
@@ -70,7 +71,7 @@ public final class Channels
/**
* Constructs a stream that writes bytes to the given channel.
*/
- public static OutputStream newOutputStream(WritableByteChannel ch)
+ public static OutputStream newOutputStream(WritableByteChannel ch)
{
if (ch instanceof FileChannelImpl)
return newOutputStream((FileChannelImpl) ch);
@@ -78,8 +79,9 @@ public final class Channels
}
static native FileInputStream newInputStream(FileChannelImpl ch);
+
static native FileOutputStream newOutputStream(FileChannelImpl ch);
-
+
/**
* Constructs a channel that reads bytes from the given stream.
*/
@@ -93,15 +95,15 @@ public final class Channels
*/
public static WritableByteChannel newChannel(OutputStream out)
{
- return new OutputStreamChannel (out);
+ return new OutputStreamChannel(out);
}
/**
* Constructs a reader that decodes bytes from the given channel using the
* given decoder.
*/
- public static Reader newReader (ReadableByteChannel ch, CharsetDecoder dec,
- int minBufferCap)
+ public static Reader newReader(ReadableByteChannel ch, CharsetDecoder dec,
+ int minBufferCap)
{
throw new Error ("not implemented");
}
@@ -113,17 +115,17 @@ public final class Channels
* @exception UnsupportedCharsetException If no support for the named charset
* is available in this instance of the Java virtual machine.
*/
- public static Reader newReader (ReadableByteChannel ch, String csName)
+ public static Reader newReader(ReadableByteChannel ch, String csName)
{
- return newReader (ch, Charset.forName (csName).newDecoder (), -1);
+ return newReader(ch, Charset.forName(csName).newDecoder(), -1);
}
/**
* Constructs a writer that encodes characters using the given encoder and
* writes the resulting bytes to the given channel.
*/
- public static Writer newWriter (WritableByteChannel ch, CharsetEncoder enc,
- int minBufferCap)
+ public static Writer newWriter(WritableByteChannel ch, CharsetEncoder enc,
+ int minBufferCap)
{
throw new Error ("not implemented");
}
@@ -135,9 +137,8 @@ public final class Channels
* @exception UnsupportedCharsetException If no support for the named charset
* is available in this instance of the Java virtual machine.
*/
- public static Writer newWriter (WritableByteChannel ch,
- String csName)
+ public static Writer newWriter(WritableByteChannel ch, String csName)
{
- return newWriter (ch, Charset.forName (csName).newEncoder (), -1);
+ return newWriter(ch, Charset.forName(csName).newEncoder(), -1);
}
}