Package play.server

Class FileService.ByteRangeInput

  • All Implemented Interfaces:
    org.jboss.netty.handler.stream.ChunkedInput
    Enclosing class:
    FileService

    public static class FileService.ByteRangeInput
    extends java.lang.Object
    implements org.jboss.netty.handler.stream.ChunkedInput
    • Constructor Summary

      Constructors 
      Constructor Description
      ByteRangeInput​(java.io.File file, java.lang.String contentType, org.jboss.netty.handler.codec.http.HttpRequest request)  
      ByteRangeInput​(java.io.RandomAccessFile raf, java.lang.String contentType, org.jboss.netty.handler.codec.http.HttpRequest request)  
    • Constructor Detail

      • ByteRangeInput

        public ByteRangeInput​(java.io.File file,
                              java.lang.String contentType,
                              org.jboss.netty.handler.codec.http.HttpRequest request)
                       throws java.io.FileNotFoundException,
                              java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • ByteRangeInput

        public ByteRangeInput​(java.io.RandomAccessFile raf,
                              java.lang.String contentType,
                              org.jboss.netty.handler.codec.http.HttpRequest request)
                       throws java.io.FileNotFoundException,
                              java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
    • Method Detail

      • prepareNettyResponse

        public void prepareNettyResponse​(org.jboss.netty.handler.codec.http.HttpResponse nettyResponse)
      • nextChunk

        public java.lang.Object nextChunk()
                                   throws java.lang.Exception
        Specified by:
        nextChunk in interface org.jboss.netty.handler.stream.ChunkedInput
        Throws:
        java.lang.Exception
      • hasNextChunk

        public boolean hasNextChunk()
                             throws java.lang.Exception
        Specified by:
        hasNextChunk in interface org.jboss.netty.handler.stream.ChunkedInput
        Throws:
        java.lang.Exception
      • isEndOfInput

        public boolean isEndOfInput()
                             throws java.lang.Exception
        Specified by:
        isEndOfInput in interface org.jboss.netty.handler.stream.ChunkedInput
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface org.jboss.netty.handler.stream.ChunkedInput
        Throws:
        java.lang.Exception
      • accepts

        public static boolean accepts​(org.jboss.netty.handler.codec.http.HttpRequest request)