Package org.uberfire.java.nio.fs.k8s
Class SeekableInMemoryByteChannel
- java.lang.Object
-
- org.uberfire.java.nio.fs.k8s.SeekableInMemoryByteChannel
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,ReadableByteChannel,WritableByteChannel,org.uberfire.java.nio.channels.SeekableByteChannel
- Direct Known Subclasses:
K8SFileChannel
public class SeekableInMemoryByteChannel extends Object implements org.uberfire.java.nio.channels.SeekableByteChannel
-
-
Field Summary
Fields Modifier and Type Field Description protected byte[]contents
-
Constructor Summary
Constructors Constructor Description SeekableInMemoryByteChannel()SeekableInMemoryByteChannel(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()InputStreamgetContent()booleanisOpen()longposition()org.uberfire.java.nio.channels.SeekableByteChannelposition(long newPosition)intread(ByteBuffer destination)longsize()StringtoString()org.uberfire.java.nio.channels.SeekableByteChanneltruncate(long size)intwrite(ByteBuffer source)
-
-
-
Method Detail
-
close
public void close()
-
read
public int read(ByteBuffer destination)
- Specified by:
readin interfaceReadableByteChannel
-
write
public int write(ByteBuffer source)
- Specified by:
writein interfaceWritableByteChannel
-
position
public long position()
- Specified by:
positionin interfaceorg.uberfire.java.nio.channels.SeekableByteChannel
-
position
public org.uberfire.java.nio.channels.SeekableByteChannel position(long newPosition)
- Specified by:
positionin interfaceorg.uberfire.java.nio.channels.SeekableByteChannel
-
size
public long size()
- Specified by:
sizein interfaceorg.uberfire.java.nio.channels.SeekableByteChannel
-
truncate
public org.uberfire.java.nio.channels.SeekableByteChannel truncate(long size)
- Specified by:
truncatein interfaceorg.uberfire.java.nio.channels.SeekableByteChannel
-
getContent
public InputStream getContent()
-
-