public class ByteChannelReader extends Object
Modifier and Type | Method and Description |
---|---|
static ByteChannelReader |
forChannel(ReadableByteChannel channel) |
int |
read(ByteBuffer buf) |
ByteChannelReader |
readAtLeast(int minBytes) |
ByteChannelReader |
readBetween(int minBytes,
int maxBytes) |
ByteChannelReader |
readExactly(int bytes) |
ByteChannelReader |
readNoMoreThan(int maxBytes) |
int |
sync(ByteBuffer buf,
byte[] syncToken) |
ByteChannelReader |
waitBetweenReads(Duration waitBetweenReads) |
ByteChannelReader |
withTimeout(Duration timeout) |
public static ByteChannelReader forChannel(ReadableByteChannel channel)
public ByteChannelReader withTimeout(Duration timeout)
public ByteChannelReader waitBetweenReads(Duration waitBetweenReads)
public ByteChannelReader readExactly(int bytes)
public ByteChannelReader readAtLeast(int minBytes)
public ByteChannelReader readNoMoreThan(int maxBytes)
public ByteChannelReader readBetween(int minBytes, int maxBytes)
public int sync(ByteBuffer buf, byte[] syncToken) throws IOException
IOException
public int read(ByteBuffer buf) throws IOException
IOException
Copyright © 2016–2021. All rights reserved.