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.ReadableByteChannel
java.io.IOException
public int read(byte[] dst) throws java.io.IOException
java.io.IOException
public int read(byte[] dst, int offset, int length) throws java.io.IOException
java.io.IOException
public boolean isOpen()
isOpen
in interface java.nio.channels.Channel
public int write(java.nio.ByteBuffer src) throws java.io.IOException
write
in interface java.nio.channels.WritableByteChannel
java.io.IOException
public int write(byte[] src) throws java.io.IOException
java.io.IOException
public int write(byte[] src, int offset, int len) throws java.io.IOException
java.io.IOException
public boolean isReadable()
public boolean isWritable()
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface java.nio.channels.Channel
java.io.IOException
public void reset()
public java.lang.Appendable append(java.lang.CharSequence csq) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.Appendable append(char c) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.Appendable append(java.lang.CharSequence csq, int start, int end) throws java.io.IOException
append
in interface java.lang.Appendable
java.io.IOException
public java.lang.Appendable append(java.lang.CharSequence csq, java.lang.String charset) throws java.io.IOException
java.io.IOException
public java.lang.Appendable append(char c, java.lang.String charset) throws java.io.IOException
java.io.IOException
public java.lang.Appendable append(java.lang.CharSequence csq, int start, int end, java.lang.String charset) throws java.io.IOException
java.io.IOException
public int read(java.nio.CharBuffer cb) throws java.io.IOException
read
in interface java.lang.Readable
java.io.IOException
public int read(java.nio.CharBuffer cb, java.lang.String charset) throws java.io.IOException
java.io.IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved