Only a few javadocs

This commit is contained in:
Norman Maurer 2012-10-28 20:45:00 +01:00
parent 87cc67306f
commit 122051ba44
4 changed files with 26 additions and 0 deletions

View File

@ -21,6 +21,9 @@ import java.nio.ByteBuffer;
import java.nio.ByteOrder; import java.nio.ByteOrder;
import java.nio.ReadOnlyBufferException; import java.nio.ReadOnlyBufferException;
/**
* Abstract base class for WrappedByteBuf implementations.
*/
public abstract class AbstractWrappedByteBuf extends AbstractByteBuf implements WrappedByteBuf { public abstract class AbstractWrappedByteBuf extends AbstractByteBuf implements WrappedByteBuf {
protected AbstractWrappedByteBuf(ByteOrder endianness, int maxCapacity) { protected AbstractWrappedByteBuf(ByteOrder endianness, int maxCapacity) {

View File

@ -16,6 +16,14 @@
package io.netty.buffer; package io.netty.buffer;
public interface ChannelBuf { public interface ChannelBuf {
/**
* The ChannelBufType which will be handled by the ChannelBuf implementation
*/
ChannelBufType type(); ChannelBufType type();
/**
* Return <code>true</code> if the ChannelBuf is pooled.
*
*/
boolean isPooled(); boolean isPooled();
} }

View File

@ -15,7 +15,17 @@
*/ */
package io.netty.buffer; package io.netty.buffer;
/**
* The type of the ChannelBuf
*/
public enum ChannelBufType { public enum ChannelBufType {
/**
* Operates one bytes.
*/
BYTE, BYTE,
/**
* Operates on messages, which can be of any kind.
*/
MESSAGE MESSAGE
} }

View File

@ -18,6 +18,11 @@ package io.netty.buffer;
import java.util.Collection; import java.util.Collection;
import java.util.Queue; import java.util.Queue;
/**
* ChannelBuf which operates on messages
*
* @param <T>
*/
public interface MessageBuf<T> extends ChannelBuf, Queue<T> { public interface MessageBuf<T> extends ChannelBuf, Queue<T> {
int drainTo(Collection<? super T> c); int drainTo(Collection<? super T> c);
int drainTo(Collection<? super T> c, int maxElements); int drainTo(Collection<? super T> c, int maxElements);