Package play.server
Class FileChannelBuffer
- java.lang.Object
-
- org.jboss.netty.buffer.AbstractChannelBuffer
-
- play.server.FileChannelBuffer
-
- All Implemented Interfaces:
java.lang.Comparable<org.jboss.netty.buffer.ChannelBuffer>
,org.jboss.netty.buffer.ChannelBuffer
,org.jboss.netty.buffer.WrappedChannelBuffer
public class FileChannelBuffer extends org.jboss.netty.buffer.AbstractChannelBuffer implements org.jboss.netty.buffer.WrappedChannelBuffer
Useless channel buffer only used to wrap the input stream....
-
-
Constructor Summary
Constructors Constructor Description FileChannelBuffer(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
array()
int
arrayOffset()
int
capacity()
org.jboss.netty.buffer.ChannelBuffer
copy(int index, int length)
void
discardReadBytes()
org.jboss.netty.buffer.ChannelBuffer
duplicate()
org.jboss.netty.buffer.ChannelBufferFactory
factory()
byte
getByte(int index)
void
getBytes(int index, byte[] dst, int dstIndex, int length)
void
getBytes(int index, java.io.OutputStream out, int length)
void
getBytes(int index, java.nio.ByteBuffer dst)
int
getBytes(int index, java.nio.channels.GatheringByteChannel out, int length)
void
getBytes(int index, org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)
java.io.InputStream
getInputStream()
int
getInt(int index)
long
getLong(int index)
short
getShort(int index)
int
getUnsignedMedium(int index)
boolean
hasArray()
boolean
isDirect()
java.nio.ByteOrder
order()
void
readBytes(byte[] dst)
void
readBytes(byte[] dst, int dstIndex, int length)
org.jboss.netty.buffer.ChannelBuffer
readBytes(int length)
void
readBytes(java.io.OutputStream out, int length)
void
readBytes(java.nio.ByteBuffer dst)
int
readBytes(java.nio.channels.GatheringByteChannel out, int length)
void
readBytes(org.jboss.netty.buffer.ChannelBuffer dst)
org.jboss.netty.buffer.ChannelBuffer
readBytes(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)
void
readBytes(org.jboss.netty.buffer.ChannelBuffer dst, int length)
void
readBytes(org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)
int
readerIndex()
org.jboss.netty.buffer.ChannelBuffer
readSlice(int length)
org.jboss.netty.buffer.ChannelBuffer
readSlice(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)
void
setByte(int index, byte value)
void
setByte(int i, int i1)
void
setBytes(int index, byte[] src, int srcIndex, int length)
int
setBytes(int index, java.io.InputStream in, int length)
void
setBytes(int index, java.nio.ByteBuffer src)
int
setBytes(int index, java.nio.channels.ScatteringByteChannel in, int length)
void
setBytes(int index, org.jboss.netty.buffer.ChannelBuffer src, int srcIndex, int length)
void
setInt(int index, int value)
void
setLong(int index, long value)
void
setMedium(int index, int value)
void
setShort(int a, int b)
void
setShort(int index, short value)
org.jboss.netty.buffer.ChannelBuffer
slice(int index, int length)
java.nio.ByteBuffer
toByteBuffer(int index, int length)
java.nio.ByteBuffer[]
toByteBuffers(int index, int length)
java.lang.String
toString(int q, int a, java.lang.String b)
org.jboss.netty.buffer.ChannelBuffer
unwrap()
-
Methods inherited from class org.jboss.netty.buffer.AbstractChannelBuffer
bytesBefore, bytesBefore, bytesBefore, bytesBefore, bytesBefore, bytesBefore, checkReadableBytes, clear, compareTo, copy, ensureWritableBytes, equals, getBytes, getBytes, getBytes, getChar, getDouble, getFloat, getMedium, getUnsignedByte, getUnsignedInt, getUnsignedShort, hashCode, indexOf, indexOf, markReaderIndex, markWriterIndex, readable, readableBytes, readByte, readChar, readDouble, readerIndex, readFloat, readInt, readLong, readMedium, readShort, readUnsignedByte, readUnsignedInt, readUnsignedMedium, readUnsignedShort, resetReaderIndex, resetWriterIndex, setBytes, setBytes, setBytes, setChar, setDouble, setFloat, setIndex, setZero, skipBytes, slice, toByteBuffer, toByteBuffers, toString, toString, toString, writable, writableBytes, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeMedium, writerIndex, writerIndex, writeShort, writeZero
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jboss.netty.buffer.ChannelBuffer
bytesBefore, bytesBefore, bytesBefore, bytesBefore, bytesBefore, bytesBefore, clear, compareTo, copy, ensureWritableBytes, equals, getBytes, getBytes, getBytes, getChar, getDouble, getFloat, getMedium, getUnsignedByte, getUnsignedInt, getUnsignedShort, hashCode, indexOf, indexOf, markReaderIndex, markWriterIndex, readable, readableBytes, readByte, readChar, readDouble, readerIndex, readFloat, readInt, readLong, readMedium, readShort, readUnsignedByte, readUnsignedInt, readUnsignedMedium, readUnsignedShort, resetReaderIndex, resetWriterIndex, setBytes, setBytes, setBytes, setChar, setDouble, setFloat, setIndex, setZero, skipBytes, slice, toByteBuffer, toByteBuffers, toString, toString, toString, writable, writableBytes, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeMedium, writerIndex, writerIndex, writeShort, writeZero
-
-
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream()
-
unwrap
public org.jboss.netty.buffer.ChannelBuffer unwrap()
- Specified by:
unwrap
in interfaceorg.jboss.netty.buffer.WrappedChannelBuffer
-
factory
public org.jboss.netty.buffer.ChannelBufferFactory factory()
- Specified by:
factory
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
order
public java.nio.ByteOrder order()
- Specified by:
order
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
isDirect
public boolean isDirect()
- Specified by:
isDirect
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
hasArray
public boolean hasArray()
- Specified by:
hasArray
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
array
public byte[] array()
- Specified by:
array
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
arrayOffset
public int arrayOffset()
- Specified by:
arrayOffset
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
discardReadBytes
public void discardReadBytes()
- Specified by:
discardReadBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
discardReadBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
setByte
public void setByte(int index, byte value)
-
setBytes
public void setBytes(int index, org.jboss.netty.buffer.ChannelBuffer src, int srcIndex, int length)
- Specified by:
setBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setBytes
public void setBytes(int index, byte[] src, int srcIndex, int length)
- Specified by:
setBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setBytes
public void setBytes(int index, java.nio.ByteBuffer src)
- Specified by:
setBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setShort
public void setShort(int index, short value)
-
setMedium
public void setMedium(int index, int value)
- Specified by:
setMedium
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setInt
public void setInt(int index, int value)
- Specified by:
setInt
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setLong
public void setLong(int index, long value)
- Specified by:
setLong
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setBytes
public int setBytes(int index, java.io.InputStream in, int length) throws java.io.IOException
- Specified by:
setBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Throws:
java.io.IOException
-
setBytes
public int setBytes(int index, java.nio.channels.ScatteringByteChannel in, int length) throws java.io.IOException
- Specified by:
setBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Throws:
java.io.IOException
-
readerIndex
public int readerIndex()
- Specified by:
readerIndex
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readerIndex
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
getBytes
public int getBytes(int index, java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
- Specified by:
getBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Throws:
java.io.IOException
-
setByte
public void setByte(int i, int i1)
- Specified by:
setByte
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getBytes
public void getBytes(int index, java.io.OutputStream out, int length) throws java.io.IOException
- Specified by:
getBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Throws:
java.io.IOException
-
getBytes
public void getBytes(int index, byte[] dst, int dstIndex, int length)
- Specified by:
getBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getBytes
public void getBytes(int index, org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)
- Specified by:
getBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getBytes
public void getBytes(int index, java.nio.ByteBuffer dst)
- Specified by:
getBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
duplicate
public org.jboss.netty.buffer.ChannelBuffer duplicate()
- Specified by:
duplicate
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
copy
public org.jboss.netty.buffer.ChannelBuffer copy(int index, int length)
- Specified by:
copy
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
slice
public org.jboss.netty.buffer.ChannelBuffer slice(int index, int length)
- Specified by:
slice
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getByte
public byte getByte(int index)
- Specified by:
getByte
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getShort
public short getShort(int index)
- Specified by:
getShort
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getUnsignedMedium
public int getUnsignedMedium(int index)
- Specified by:
getUnsignedMedium
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getInt
public int getInt(int index)
- Specified by:
getInt
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getLong
public long getLong(int index)
- Specified by:
getLong
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
toByteBuffer
public java.nio.ByteBuffer toByteBuffer(int index, int length)
- Specified by:
toByteBuffer
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
toByteBuffers
public java.nio.ByteBuffer[] toByteBuffers(int index, int length)
- Specified by:
toByteBuffers
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
toByteBuffers
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
capacity
public int capacity()
- Specified by:
capacity
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
readBytes
public org.jboss.netty.buffer.ChannelBuffer readBytes(int length)
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public org.jboss.netty.buffer.ChannelBuffer readBytes(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)
-
readSlice
public org.jboss.netty.buffer.ChannelBuffer readSlice(int length)
- Specified by:
readSlice
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readSlice
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readSlice
public org.jboss.netty.buffer.ChannelBuffer readSlice(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)
-
readBytes
public void readBytes(byte[] dst, int dstIndex, int length)
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(byte[] dst)
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst)
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst, int length)
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(java.nio.ByteBuffer dst)
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public int readBytes(java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
- Throws:
java.io.IOException
-
readBytes
public void readBytes(java.io.OutputStream out, int length) throws java.io.IOException
- Specified by:
readBytes
in interfaceorg.jboss.netty.buffer.ChannelBuffer
- Overrides:
readBytes
in classorg.jboss.netty.buffer.AbstractChannelBuffer
- Throws:
java.io.IOException
-
toString
public java.lang.String toString(int q, int a, java.lang.String b)
-
setShort
public void setShort(int a, int b)
- Specified by:
setShort
in interfaceorg.jboss.netty.buffer.ChannelBuffer
-
-