play.server
Class FileChannelBuffer

java.lang.Object
  extended by org.jboss.netty.buffer.AbstractChannelBuffer
      extended by 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
FileChannelBuffer(java.io.File file)
           
 
Method Summary
 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.nio.ByteBuffer dst)
           
 void getBytes(int index, org.jboss.netty.buffer.ChannelBuffer dst, int dstIndex, int length)
           
 int getBytes(int index, java.nio.channels.GatheringByteChannel out, int length)
           
 void getBytes(int index, java.io.OutputStream out, 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)
           
 void readBytes(java.nio.ByteBuffer dst)
           
 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 readBytes(java.nio.channels.GatheringByteChannel out, int length)
           
 org.jboss.netty.buffer.ChannelBuffer readBytes(int length)
           
 void readBytes(java.io.OutputStream out, int length)
           
 int readerIndex()
           
 org.jboss.netty.buffer.ChannelBuffer readSlice(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)
           
 org.jboss.netty.buffer.ChannelBuffer readSlice(int length)
           
 void setByte(int index, byte value)
           
 void setByte(int i, int i1)
           
 void setBytes(int index, byte[] src, int srcIndex, int length)
           
 void setBytes(int index, java.nio.ByteBuffer src)
           
 void setBytes(int index, org.jboss.netty.buffer.ChannelBuffer src, int srcIndex, int length)
           
 int setBytes(int index, java.io.InputStream in, int length)
           
 int setBytes(int index, java.nio.channels.ScatteringByteChannel in, 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, skipBytes, slice, toByteBuffer, toByteBuffers, toString, toString, toString, 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, skipBytes, slice, toByteBuffer, toByteBuffers, toString, toString, toString, toString, toString, toString, writable, writableBytes, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeMedium, writerIndex, writerIndex, writeShort, writeZero
 

Constructor Detail

FileChannelBuffer

public FileChannelBuffer(java.io.File file)
Method Detail

getInputStream

public java.io.InputStream getInputStream()

unwrap

public org.jboss.netty.buffer.ChannelBuffer unwrap()
Specified by:
unwrap in interface org.jboss.netty.buffer.WrappedChannelBuffer

factory

public org.jboss.netty.buffer.ChannelBufferFactory factory()
Specified by:
factory in interface org.jboss.netty.buffer.ChannelBuffer

order

public java.nio.ByteOrder order()
Specified by:
order in interface org.jboss.netty.buffer.ChannelBuffer

isDirect

public boolean isDirect()
Specified by:
isDirect in interface org.jboss.netty.buffer.ChannelBuffer

hasArray

public boolean hasArray()
Specified by:
hasArray in interface org.jboss.netty.buffer.ChannelBuffer

array

public byte[] array()
Specified by:
array in interface org.jboss.netty.buffer.ChannelBuffer

arrayOffset

public int arrayOffset()
Specified by:
arrayOffset in interface org.jboss.netty.buffer.ChannelBuffer

discardReadBytes

public void discardReadBytes()
Specified by:
discardReadBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
discardReadBytes in class org.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 interface org.jboss.netty.buffer.ChannelBuffer

setBytes

public void setBytes(int index,
                     byte[] src,
                     int srcIndex,
                     int length)
Specified by:
setBytes in interface org.jboss.netty.buffer.ChannelBuffer

setBytes

public void setBytes(int index,
                     java.nio.ByteBuffer src)
Specified by:
setBytes in interface org.jboss.netty.buffer.ChannelBuffer

setShort

public void setShort(int index,
                     short value)

setMedium

public void setMedium(int index,
                      int value)
Specified by:
setMedium in interface org.jboss.netty.buffer.ChannelBuffer

setInt

public void setInt(int index,
                   int value)
Specified by:
setInt in interface org.jboss.netty.buffer.ChannelBuffer

setLong

public void setLong(int index,
                    long value)
Specified by:
setLong in interface org.jboss.netty.buffer.ChannelBuffer

setBytes

public int setBytes(int index,
                    java.io.InputStream in,
                    int length)
             throws java.io.IOException
Specified by:
setBytes in interface org.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 interface org.jboss.netty.buffer.ChannelBuffer
Throws:
java.io.IOException

readerIndex

public int readerIndex()
Specified by:
readerIndex in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readerIndex in class org.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 interface org.jboss.netty.buffer.ChannelBuffer
Throws:
java.io.IOException

setByte

public void setByte(int i,
                    int i1)
Specified by:
setByte in interface org.jboss.netty.buffer.ChannelBuffer

getBytes

public void getBytes(int index,
                     java.io.OutputStream out,
                     int length)
              throws java.io.IOException
Specified by:
getBytes in interface org.jboss.netty.buffer.ChannelBuffer
Throws:
java.io.IOException

getBytes

public void getBytes(int index,
                     byte[] dst,
                     int dstIndex,
                     int length)
Specified by:
getBytes in interface org.jboss.netty.buffer.ChannelBuffer

getBytes

public void getBytes(int index,
                     org.jboss.netty.buffer.ChannelBuffer dst,
                     int dstIndex,
                     int length)
Specified by:
getBytes in interface org.jboss.netty.buffer.ChannelBuffer

getBytes

public void getBytes(int index,
                     java.nio.ByteBuffer dst)
Specified by:
getBytes in interface org.jboss.netty.buffer.ChannelBuffer

duplicate

public org.jboss.netty.buffer.ChannelBuffer duplicate()
Specified by:
duplicate in interface org.jboss.netty.buffer.ChannelBuffer

copy

public org.jboss.netty.buffer.ChannelBuffer copy(int index,
                                                 int length)
Specified by:
copy in interface org.jboss.netty.buffer.ChannelBuffer

slice

public org.jboss.netty.buffer.ChannelBuffer slice(int index,
                                                  int length)
Specified by:
slice in interface org.jboss.netty.buffer.ChannelBuffer

getByte

public byte getByte(int index)
Specified by:
getByte in interface org.jboss.netty.buffer.ChannelBuffer

getShort

public short getShort(int index)
Specified by:
getShort in interface org.jboss.netty.buffer.ChannelBuffer

getUnsignedMedium

public int getUnsignedMedium(int index)
Specified by:
getUnsignedMedium in interface org.jboss.netty.buffer.ChannelBuffer

getInt

public int getInt(int index)
Specified by:
getInt in interface org.jboss.netty.buffer.ChannelBuffer

getLong

public long getLong(int index)
Specified by:
getLong in interface org.jboss.netty.buffer.ChannelBuffer

toByteBuffer

public java.nio.ByteBuffer toByteBuffer(int index,
                                        int length)
Specified by:
toByteBuffer in interface org.jboss.netty.buffer.ChannelBuffer

toByteBuffers

public java.nio.ByteBuffer[] toByteBuffers(int index,
                                           int length)
Specified by:
toByteBuffers in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
toByteBuffers in class org.jboss.netty.buffer.AbstractChannelBuffer

capacity

public int capacity()
Specified by:
capacity in interface org.jboss.netty.buffer.ChannelBuffer

readBytes

public org.jboss.netty.buffer.ChannelBuffer readBytes(int length)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public org.jboss.netty.buffer.ChannelBuffer readBytes(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readSlice

public org.jboss.netty.buffer.ChannelBuffer readSlice(int length)
Specified by:
readSlice in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readSlice in class org.jboss.netty.buffer.AbstractChannelBuffer

readSlice

public org.jboss.netty.buffer.ChannelBuffer readSlice(org.jboss.netty.buffer.ChannelBufferIndexFinder endIndexFinder)
Specified by:
readSlice in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readSlice in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public void readBytes(byte[] dst,
                      int dstIndex,
                      int length)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public void readBytes(byte[] dst)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst,
                      int length)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public void readBytes(org.jboss.netty.buffer.ChannelBuffer dst,
                      int dstIndex,
                      int length)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public void readBytes(java.nio.ByteBuffer dst)
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer

readBytes

public int readBytes(java.nio.channels.GatheringByteChannel out,
                     int length)
              throws java.io.IOException
Specified by:
readBytes in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.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 interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
readBytes in class org.jboss.netty.buffer.AbstractChannelBuffer
Throws:
java.io.IOException

toString

public java.lang.String toString(int q,
                                 int a,
                                 java.lang.String b)
Specified by:
toString in interface org.jboss.netty.buffer.ChannelBuffer
Overrides:
toString in class org.jboss.netty.buffer.AbstractChannelBuffer

setShort

public void setShort(int a,
                     int b)
Specified by:
setShort in interface org.jboss.netty.buffer.ChannelBuffer


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly