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.WrappedChannelBufferUseless 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()intarrayOffset()intcapacity()org.jboss.netty.buffer.ChannelBuffercopy(int index, int length)voiddiscardReadBytes()org.jboss.netty.buffer.ChannelBufferduplicate()org.jboss.netty.buffer.ChannelBufferFactoryfactory()bytegetByte(int index)voidgetBytes(int index, byte[] dst, int dstIndex, int length)voidgetBytes(int index, java.io.OutputStream out, int length)voidgetBytes(int index, java.nio.ByteBuffer dst)intgetBytes(int index, java.nio.channels.GatheringByteChannel out, int length)voidgetBytes(int index, org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)java.io.InputStreamgetInputStream()intgetInt(int index)longgetLong(int index)shortgetShort(int index)intgetUnsignedMedium(int index)booleanhasArray()booleanisDirect()java.nio.ByteOrderorder()voidreadBytes(byte[] dst)voidreadBytes(byte[] dst, int dstIndex, int length)org.jboss.netty.buffer.ChannelBufferreadBytes(int length)voidreadBytes(java.io.OutputStream out, int length)voidreadBytes(java.nio.ByteBuffer dst)intreadBytes(java.nio.channels.GatheringByteChannel out, int length)voidreadBytes(org.jboss.netty.buffer.ChannelBuffer dst)org.jboss.netty.buffer.ChannelBufferreadBytes(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)voidreadBytes(org.jboss.netty.buffer.ChannelBuffer dst, int length)voidreadBytes(org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)intreaderIndex()org.jboss.netty.buffer.ChannelBufferreadSlice(int length)org.jboss.netty.buffer.ChannelBufferreadSlice(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)voidsetByte(int index, byte value)voidsetByte(int i, int i1)voidsetBytes(int index, byte[] src, int srcIndex, int length)intsetBytes(int index, java.io.InputStream in, int length)voidsetBytes(int index, java.nio.ByteBuffer src)intsetBytes(int index, java.nio.channels.ScatteringByteChannel in, int length)voidsetBytes(int index, org.jboss.netty.buffer.ChannelBuffer src, int srcIndex, int length)voidsetInt(int index, int value)voidsetLong(int index, long value)voidsetMedium(int index, int value)voidsetShort(int a, int b)voidsetShort(int index, short value)org.jboss.netty.buffer.ChannelBufferslice(int index, int length)java.nio.ByteBuffertoByteBuffer(int index, int length)java.nio.ByteBuffer[]toByteBuffers(int index, int length)java.lang.StringtoString(int q, int a, java.lang.String b)org.jboss.netty.buffer.ChannelBufferunwrap()-
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:
unwrapin interfaceorg.jboss.netty.buffer.WrappedChannelBuffer
-
factory
public org.jboss.netty.buffer.ChannelBufferFactory factory()
- Specified by:
factoryin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
order
public java.nio.ByteOrder order()
- Specified by:
orderin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
isDirect
public boolean isDirect()
- Specified by:
isDirectin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
hasArray
public boolean hasArray()
- Specified by:
hasArrayin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
array
public byte[] array()
- Specified by:
arrayin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
arrayOffset
public int arrayOffset()
- Specified by:
arrayOffsetin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
discardReadBytes
public void discardReadBytes()
- Specified by:
discardReadBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
discardReadBytesin 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:
setBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setBytes
public void setBytes(int index, byte[] src, int srcIndex, int length)- Specified by:
setBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setBytes
public void setBytes(int index, java.nio.ByteBuffer src)- Specified by:
setBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setShort
public void setShort(int index, short value)
-
setMedium
public void setMedium(int index, int value)- Specified by:
setMediumin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setInt
public void setInt(int index, int value)- Specified by:
setIntin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setLong
public void setLong(int index, long value)- Specified by:
setLongin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
setBytes
public int setBytes(int index, java.io.InputStream in, int length) throws java.io.IOException- Specified by:
setBytesin 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:
setBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Throws:
java.io.IOException
-
readerIndex
public int readerIndex()
- Specified by:
readerIndexin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readerIndexin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
getBytes
public int getBytes(int index, java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException- Specified by:
getBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Throws:
java.io.IOException
-
setByte
public void setByte(int i, int i1)- Specified by:
setBytein interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getBytes
public void getBytes(int index, java.io.OutputStream out, int length) throws java.io.IOException- Specified by:
getBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Throws:
java.io.IOException
-
getBytes
public void getBytes(int index, byte[] dst, int dstIndex, int length)- Specified by:
getBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getBytes
public void getBytes(int index, org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)- Specified by:
getBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getBytes
public void getBytes(int index, java.nio.ByteBuffer dst)- Specified by:
getBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
duplicate
public org.jboss.netty.buffer.ChannelBuffer duplicate()
- Specified by:
duplicatein interfaceorg.jboss.netty.buffer.ChannelBuffer
-
copy
public org.jboss.netty.buffer.ChannelBuffer copy(int index, int length)- Specified by:
copyin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
slice
public org.jboss.netty.buffer.ChannelBuffer slice(int index, int length)- Specified by:
slicein interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getByte
public byte getByte(int index)
- Specified by:
getBytein interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getShort
public short getShort(int index)
- Specified by:
getShortin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getUnsignedMedium
public int getUnsignedMedium(int index)
- Specified by:
getUnsignedMediumin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getInt
public int getInt(int index)
- Specified by:
getIntin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
getLong
public long getLong(int index)
- Specified by:
getLongin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
toByteBuffer
public java.nio.ByteBuffer toByteBuffer(int index, int length)- Specified by:
toByteBufferin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
toByteBuffers
public java.nio.ByteBuffer[] toByteBuffers(int index, int length)- Specified by:
toByteBuffersin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
toByteBuffersin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
capacity
public int capacity()
- Specified by:
capacityin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
readBytes
public org.jboss.netty.buffer.ChannelBuffer readBytes(int length)
- Specified by:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin 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:
readSlicein interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readSlicein 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:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(byte[] dst)
- Specified by:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst)
- Specified by:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst, int length)- Specified by:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)- Specified by:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public void readBytes(java.nio.ByteBuffer dst)
- Specified by:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin classorg.jboss.netty.buffer.AbstractChannelBuffer
-
readBytes
public int readBytes(java.nio.channels.GatheringByteChannel out, int length) throws java.io.IOException- Specified by:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin 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:
readBytesin interfaceorg.jboss.netty.buffer.ChannelBuffer- Overrides:
readBytesin 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:
setShortin interfaceorg.jboss.netty.buffer.ChannelBuffer
-
-