public class PipeChannel
extends java.lang.Object
implements java.nio.channels.ReadableByteChannel, java.nio.channels.WritableByteChannel, java.lang.Appendable, java.lang.Readable, java.io.Closeable
| Constructor and Description |
|---|
PipeChannel() |
PipeChannel(java.lang.String charset) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Appendable |
append(char c) |
java.lang.Appendable |
append(java.lang.CharSequence csq) |
java.lang.Appendable |
append(java.lang.CharSequence csq,
int start,
int end) |
java.lang.Appendable |
append(java.lang.CharSequence csq,
int start,
int end,
java.lang.String charset) |
java.lang.Appendable |
append(java.lang.CharSequence csq,
java.lang.String charset) |
java.lang.Appendable |
append(char c,
java.lang.String charset) |
void |
close()
If the pipe is writable, this will close the input and switch to readable mode If the pipe is readable, this will
close the output and reset the pipe
|
java.io.InputStream |
getInputStream()
Get an inputstream that can read from this pipe.
|
CodepointIterator |
getIterator()
Get a CodepointIterator that can iterate over unicode codepoints in this pipe.
|
CodepointIterator |
getIterator(java.lang.String charset)
Get a CodepointIterator that can iterate over unicode codepoints in this pipe.
|
java.io.OutputStream |
getOutputStream()
Get an outputstream that can write to this pipe.
|
java.io.Reader |
getReader()
Get a reader that can reader from this pipe.
|
java.io.Reader |
getReader(java.lang.String charset)
Get a reader that can reader from this pipe.
|
java.io.Writer |
getWriter()
Get a writer that can write to this pipe.
|
java.io.Writer |
getWriter(java.lang.String charset)
Get a writer that can write to this pipe.
|
boolean |
isOpen()
True if the pipe is open
|
boolean |
isReadable()
True if this pipe is readable
|
boolean |
isWritable()
True if this pipe is writable
|
int |
read(byte[] dst)
Read from the pipe.
|
int |
read(byte[] dst,
int offset,
int length)
Read from the pipe.
|
int |
read(java.nio.ByteBuffer dst)
Read from the pipe.
|
int |
read(java.nio.CharBuffer cb) |
int |
read(java.nio.CharBuffer cb,
java.lang.String charset) |
void |
reset()
Reset the pipe.
|
int |
write(byte[] src)
Write to the pipe
|
int |
write(byte[] src,
int offset,
int len)
Write to the pipe
|
int |
write(java.nio.ByteBuffer src)
Write to the pipe
|
public PipeChannel()
public PipeChannel(java.lang.String charset)
public java.io.InputStream getInputStream()
public java.io.OutputStream getOutputStream()
public java.io.Writer getWriter()
public java.io.Writer getWriter(java.lang.String charset)
public java.io.Reader getReader(java.lang.String charset)
public java.io.Reader getReader()
public CodepointIterator getIterator()
public CodepointIterator getIterator(java.lang.String charset)
public int read(java.nio.ByteBuffer dst)
throws java.io.IOException
read in interface java.nio.channels.ReadableByteChanneljava.io.IOExceptionpublic int read(byte[] dst)
throws java.io.IOException
java.io.IOExceptionpublic int read(byte[] dst,
int offset,
int length)
throws java.io.IOException
java.io.IOExceptionpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic int write(java.nio.ByteBuffer src)
throws java.io.IOException
write in interface java.nio.channels.WritableByteChanneljava.io.IOExceptionpublic int write(byte[] src)
throws java.io.IOException
java.io.IOExceptionpublic int write(byte[] src,
int offset,
int len)
throws java.io.IOException
java.io.IOExceptionpublic boolean isReadable()
public boolean isWritable()
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channeljava.io.IOExceptionpublic void reset()
public java.lang.Appendable append(java.lang.CharSequence csq)
throws java.io.IOException
append in interface java.lang.Appendablejava.io.IOExceptionpublic java.lang.Appendable append(char c)
throws java.io.IOException
append in interface java.lang.Appendablejava.io.IOExceptionpublic java.lang.Appendable append(java.lang.CharSequence csq,
int start,
int end)
throws java.io.IOException
append in interface java.lang.Appendablejava.io.IOExceptionpublic java.lang.Appendable append(java.lang.CharSequence csq,
java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Appendable append(char c,
java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Appendable append(java.lang.CharSequence csq,
int start,
int end,
java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionpublic int read(java.nio.CharBuffer cb)
throws java.io.IOException
read in interface java.lang.Readablejava.io.IOExceptionpublic int read(java.nio.CharBuffer cb,
java.lang.String charset)
throws java.io.IOException
java.io.IOExceptionCopyright © 2010 - 2023 Adobe. All Rights Reserved