public class SeekableInMemoryByteChannel extends Object implements SeekableByteChannel
Modifier and Type | Field and Description |
---|---|
protected byte[] |
contents |
Constructor and Description |
---|
SeekableInMemoryByteChannel() |
SeekableInMemoryByteChannel(int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
InputStream |
getContent() |
boolean |
isOpen() |
long |
position() |
SeekableByteChannel |
position(long newPosition) |
int |
read(ByteBuffer destination) |
long |
size() |
String |
toString() |
SeekableByteChannel |
truncate(long size) |
int |
write(ByteBuffer source) |
public SeekableInMemoryByteChannel(int capacity)
public SeekableInMemoryByteChannel()
public void close()
public int read(ByteBuffer destination)
read
in interface ReadableByteChannel
public int write(ByteBuffer source)
write
in interface WritableByteChannel
public long position()
position
in interface SeekableByteChannel
public SeekableByteChannel position(long newPosition)
position
in interface SeekableByteChannel
public long size()
size
in interface SeekableByteChannel
public SeekableByteChannel truncate(long size)
truncate
in interface SeekableByteChannel
public InputStream getContent()
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.