public class DelimiterBasedReadableByteChannel extends Object implements ReadableByteChannel, Iterable<byte[]>
| 构造器和说明 |
|---|
DelimiterBasedReadableByteChannel(ReadableByteChannel channel,
String delimiter) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
boolean |
hasNextSegment() |
boolean |
isOpen() |
Iterator<byte[]> |
iterator() |
ByteBuffer |
nextSegment() |
int |
read(ByteBuffer dst) |
int |
read(ByteBuffer dst,
String delimiter) |
void |
setDelimiter(String delimiter) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic DelimiterBasedReadableByteChannel(ReadableByteChannel channel, String delimiter)
public int read(ByteBuffer dst, String delimiter) throws IOException
IOExceptionpublic void setDelimiter(String delimiter)
public int read(ByteBuffer dst) throws IOException
read 在接口中 ReadableByteChannelIOExceptionpublic boolean hasNextSegment()
throws IOException
IOExceptionpublic ByteBuffer nextSegment() throws IOException
IOExceptionpublic void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在接口中 ChannelIOExceptionCopyright © 2020. All rights reserved.