public class PipeChannel extends Object implements ReadableByteChannel, WritableByteChannel, Appendable, Readable, Closeable
Constructor and Description |
---|
PipeChannel() |
PipeChannel(String charset) |
Modifier and Type | Method and Description |
---|---|
Appendable |
append(char c) |
Appendable |
append(CharSequence csq) |
Appendable |
append(CharSequence csq,
int start,
int end) |
Appendable |
append(CharSequence csq,
int start,
int end,
String charset) |
Appendable |
append(CharSequence csq,
String charset) |
Appendable |
append(char c,
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
|
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(String charset)
Get a CodepointIterator that can iterate over unicode codepoints in this pipe.
|
OutputStream |
getOutputStream()
Get an outputstream that can write to this pipe.
|
Reader |
getReader()
Get a reader that can reader from this pipe.
|
Reader |
getReader(String charset)
Get a reader that can reader from this pipe.
|
Writer |
getWriter()
Get a writer that can write to this pipe.
|
Writer |
getWriter(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(ByteBuffer dst)
Read from the pipe.
|
int |
read(CharBuffer cb) |
int |
read(CharBuffer cb,
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(ByteBuffer src)
Write to the pipe
|
public PipeChannel()
public PipeChannel(String charset)
public InputStream getInputStream()
public OutputStream getOutputStream()
public Writer getWriter()
public Writer getWriter(String charset)
public Reader getReader(String charset)
public Reader getReader()
public CodepointIterator getIterator()
public CodepointIterator getIterator(String charset)
public int read(ByteBuffer dst) throws IOException
read
in interface ReadableByteChannel
IOException
public int read(byte[] dst) throws IOException
IOException
public int read(byte[] dst, int offset, int length) throws IOException
IOException
public int write(ByteBuffer src) throws IOException
write
in interface WritableByteChannel
IOException
public int write(byte[] src) throws IOException
IOException
public int write(byte[] src, int offset, int len) throws IOException
IOException
public boolean isReadable()
public boolean isWritable()
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface Channel
IOException
public void reset()
public Appendable append(CharSequence csq) throws IOException
append
in interface Appendable
IOException
public Appendable append(char c) throws IOException
append
in interface Appendable
IOException
public Appendable append(CharSequence csq, int start, int end) throws IOException
append
in interface Appendable
IOException
public Appendable append(CharSequence csq, String charset) throws IOException
IOException
public Appendable append(char c, String charset) throws IOException
IOException
public Appendable append(CharSequence csq, int start, int end, String charset) throws IOException
IOException
public int read(CharBuffer cb) throws IOException
read
in interface Readable
IOException
public int read(CharBuffer cb, String charset) throws IOException
IOException
Copyright © 2010 - 2020 Adobe. All Rights Reserved