org.openrdf.http.object.util
Class ChannelUtil
java.lang.Object
org.openrdf.http.object.util.ChannelUtil
public final class ChannelUtil
- extends java.lang.Object
Utilities methods for converting between channels and streams.
- Author:
- James Leigh
|
Method Summary |
static java.nio.channels.ReadableByteChannel |
emptyChannel()
|
static boolean |
isChannel(java.io.InputStream in)
|
static byte[] |
newByteArray(java.io.InputStream in)
|
static byte[] |
newByteArray(java.nio.channels.ReadableByteChannel ch)
|
static java.nio.channels.ReadableByteChannel |
newChannel(byte[] bytes)
|
static java.nio.channels.ReadableByteChannel |
newChannel(java.io.InputStream in)
|
static java.nio.channels.WritableByteChannel |
newChannel(java.io.OutputStream out)
|
static java.io.InputStream |
newInputStream(java.nio.channels.ReadableByteChannel ch)
|
static java.io.OutputStream |
newOutputStream(java.nio.channels.WritableByteChannel ch)
|
static java.io.BufferedReader |
newReader(java.nio.channels.ReadableByteChannel ch,
java.nio.charset.Charset cs)
|
static java.io.Writer |
newWriter(java.nio.channels.WritableByteChannel ch,
java.nio.charset.Charset cs)
|
static long |
transfer(java.io.InputStream in,
java.io.OutputStream out)
|
static long |
transfer(java.io.InputStream in,
java.io.OutputStream out,
java.security.MessageDigest digest)
|
static long |
transfer(java.io.InputStream in,
java.nio.channels.WritableByteChannel out)
|
static long |
transfer(java.io.InputStream in,
java.nio.channels.WritableByteChannel out,
java.security.MessageDigest digest)
|
static long |
transfer(java.nio.channels.ReadableByteChannel in,
java.io.OutputStream out)
|
static long |
transfer(java.nio.channels.ReadableByteChannel in,
java.io.OutputStream out,
java.security.MessageDigest digest)
|
static long |
transfer(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out)
|
static long |
transfer(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out,
java.security.MessageDigest digest)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isChannel
public static boolean isChannel(java.io.InputStream in)
newChannel
public static java.nio.channels.ReadableByteChannel newChannel(java.io.InputStream in)
newChannel
public static java.nio.channels.WritableByteChannel newChannel(java.io.OutputStream out)
newChannel
public static java.nio.channels.ReadableByteChannel newChannel(byte[] bytes)
newInputStream
public static java.io.InputStream newInputStream(java.nio.channels.ReadableByteChannel ch)
newOutputStream
public static java.io.OutputStream newOutputStream(java.nio.channels.WritableByteChannel ch)
newReader
public static java.io.BufferedReader newReader(java.nio.channels.ReadableByteChannel ch,
java.nio.charset.Charset cs)
newWriter
public static java.io.Writer newWriter(java.nio.channels.WritableByteChannel ch,
java.nio.charset.Charset cs)
transfer
public static long transfer(java.io.InputStream in,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
transfer
public static long transfer(java.io.InputStream in,
java.nio.channels.WritableByteChannel out)
throws java.io.IOException
- Throws:
java.io.IOException
transfer
public static long transfer(java.nio.channels.ReadableByteChannel in,
java.io.OutputStream out)
throws java.io.IOException
- Throws:
java.io.IOException
transfer
public static long transfer(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out)
throws java.io.IOException
- Throws:
java.io.IOException
transfer
public static long transfer(java.io.InputStream in,
java.io.OutputStream out,
java.security.MessageDigest digest)
throws java.io.IOException
- Throws:
java.io.IOException
transfer
public static long transfer(java.io.InputStream in,
java.nio.channels.WritableByteChannel out,
java.security.MessageDigest digest)
throws java.io.IOException
- Throws:
java.io.IOException
transfer
public static long transfer(java.nio.channels.ReadableByteChannel in,
java.io.OutputStream out,
java.security.MessageDigest digest)
throws java.io.IOException
- Throws:
java.io.IOException
transfer
public static long transfer(java.nio.channels.ReadableByteChannel in,
java.nio.channels.WritableByteChannel out,
java.security.MessageDigest digest)
throws java.io.IOException
- Throws:
java.io.IOException
newByteArray
public static byte[] newByteArray(java.io.InputStream in)
throws java.io.IOException
- Throws:
java.io.IOException
newByteArray
public static byte[] newByteArray(java.nio.channels.ReadableByteChannel ch)
throws java.io.IOException
- Throws:
java.io.IOException
emptyChannel
public static java.nio.channels.ReadableByteChannel emptyChannel()
Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.