Class ReadableChunkingChannel
- java.lang.Object
-
- org.restlet.ext.nio.internal.channel.WrapperChannel<java.nio.channels.ReadableByteChannel>
-
- org.restlet.ext.nio.internal.channel.ReadableChunkingChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel,java.nio.channels.ReadableByteChannel
@Deprecated public class ReadableChunkingChannel extends WrapperChannel<java.nio.channels.ReadableByteChannel> implements java.nio.channels.ReadableByteChannel
Deprecated.Will be removed to favor lower-level network extensions allowing more control at the Restlet API level.Readable byte channel capable of encoding chunked entities.
-
-
Field Summary
Fields Modifier and Type Field Description private intchunkSizeLengthDeprecated.The constant chunk part containing the size of the chunk data.private booleanlastChunkWrittenDeprecated.Indicates if the last chunk has already been written.
-
Constructor Summary
Constructors Constructor Description ReadableChunkingChannel(java.nio.channels.ReadableByteChannel source, int maxBufferSize)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private intfillChunkSizeString(int chunkDataSize, java.nio.ByteBuffer targetBuffer)Deprecated.Returns an hexadecimal chunk size string with a constant length, adding the necessary number of leading zeroes.intread(java.nio.ByteBuffer dst)Deprecated.Reads some bytes and put them into the destination buffer.-
Methods inherited from class org.restlet.ext.nio.internal.channel.WrapperChannel
close, getWrappedChannel, isOpen
-
-
-
-
Method Detail
-
fillChunkSizeString
private int fillChunkSizeString(int chunkDataSize, java.nio.ByteBuffer targetBuffer)Deprecated.Returns an hexadecimal chunk size string with a constant length, adding the necessary number of leading zeroes.- Parameters:
chunkDataSize- The chunk data size value.targetBuffer- The destination buffer.- Returns:
- The length of the chunk size string.
-
read
public int read(java.nio.ByteBuffer dst) throws java.io.IOExceptionDeprecated.Reads some bytes and put them into the destination buffer. The bytes come from the underlying channel.- Specified by:
readin interfacejava.nio.channels.ReadableByteChannel- Parameters:
dst- The destination buffer.- Returns:
- The number of bytes read, or -1 if the end of the channel has been reached.
- Throws:
java.io.IOException
-
-