Class PathRequestContent

java.lang.Object
org.eclipse.jetty.io.content.PathContentSource
org.eclipse.jetty.client.PathRequestContent
All Implemented Interfaces:
Request.Content, org.eclipse.jetty.io.Content.Source

public class PathRequestContent extends org.eclipse.jetty.io.content.PathContentSource implements Request.Content

A Request.Content for files using JDK 7's java.nio.file APIs.

It is possible to specify a buffer size used to read content from the stream, by default 4096 bytes, whether the buffer should be direct or not, and a ByteBufferPool from which ByteBuffers will be acquired to read from the Path.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Content.Source

    org.eclipse.jetty.io.Content.Source.Factory
  • Constructor Summary

    Constructors
    Constructor
    Description
    PathRequestContent(String contentType, Path filePath)
     
    PathRequestContent(String contentType, Path filePath, int bufferSize)
     
    PathRequestContent(String contentType, Path filePath, org.eclipse.jetty.io.ByteBufferPool bufferPool)
     
    PathRequestContent(String contentType, Path filePath, org.eclipse.jetty.io.ByteBufferPool.Sized sizedBufferPool)
     
     
    PathRequestContent(Path filePath, int bufferSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     

    Methods inherited from class org.eclipse.jetty.io.content.PathContentSource

    demand, fail, getBufferSize, getLength, getPath, isReadComplete, isUseDirectByteBuffers, open, read, read, rewind, setBufferSize, setUseDirectByteBuffers

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.jetty.io.Content.Source

    demand, fail, fail, getLength, read, rewind