@Deprecated public class InputStreamChannel extends Object implements ReadableByteChannel, BlockableChannel
| Constructor and Description |
|---|
InputStreamChannel(InputStream inputStream)
Deprecated.
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Deprecated.
Closes the underlying input stream.
|
protected InputStream |
getInputStream()
Deprecated.
Returns the underlying input stream.
|
boolean |
isBlocking()
Deprecated.
True if the underlying input stream is able to indicate available bytes
upfront.
|
boolean |
isOpen()
Deprecated.
Indicates if the channel and its underlying stream are open.
|
int |
read(ByteBuffer target)
Deprecated.
Reads bytes from the underlying stream to the target buffer.
|
public InputStreamChannel(InputStream inputStream) throws IOException
inputStream - IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionprotected InputStream getInputStream()
public boolean isBlocking()
isBlocking in interface BlockableChannelpublic boolean isOpen()
public int read(ByteBuffer target) throws IOException
read in interface ReadableByteChanneltarget - The target byte buffer.IOExceptionCopyright © 2005–2025. All rights reserved.