Class HttpGenerator

java.lang.Object
org.eclipse.jetty.http.HttpGenerator

public class HttpGenerator extends Object
HttpGenerator. Builds HTTP Messages.

If the system property "org.eclipse.jetty.http.HttpGenerator.STRICT" is set to true, then the generator will strictly pass on the exact strings received from methods and header fields. Otherwise a fast case insensitive string lookup is used that may alter the case and white space of some methods/headers

  • Field Details

    • __STRICT

      public static final boolean __STRICT
    • CONTINUE_100_INFO

      public static final MetaData.Response CONTINUE_100_INFO
    • CHUNK_SIZE

      public static final int CHUNK_SIZE
      See Also:
  • Constructor Details

    • HttpGenerator

      public HttpGenerator()
  • Method Details

    • reset

      public void reset()
    • getMaxHeaderBytes

      public int getMaxHeaderBytes()
    • setMaxHeaderBytes

      public void setMaxHeaderBytes(int maxHeaderBytes)
    • getState

      public HttpGenerator.State getState()
    • isState

      public boolean isState(HttpGenerator.State state)
    • isIdle

      public boolean isIdle()
    • isEnd

      public boolean isEnd()
    • isCommitted

      public boolean isCommitted()
    • isChunking

      public boolean isChunking()
    • isNoContent

      public boolean isNoContent()
    • setPersistent

      public void setPersistent(boolean persistent)
    • isPersistent

      public boolean isPersistent()
      Returns:
      true if known to be persistent
    • isPersistent

      public boolean isPersistent(HttpVersion version)
      Returns:
      true if known to be persistent
    • isWritten

      public boolean isWritten()
    • getContentPrepared

      public long getContentPrepared()
    • abort

      public void abort()
    • generateRequest

      public HttpGenerator.Result generateRequest(MetaData.Request info, ByteBuffer header, ByteBuffer chunk, ByteBuffer content, boolean last) throws IOException
      Throws:
      IOException
    • generateResponse

      public HttpGenerator.Result generateResponse(MetaData.Response info, boolean head, ByteBuffer header, ByteBuffer chunk, ByteBuffer content, boolean last) throws IOException
      Throws:
      IOException
    • servletUpgrade

      public void servletUpgrade()
    • getReasonBuffer

      @Deprecated(forRemoval=true) public static byte[] getReasonBuffer(int code)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • putTo

      public static void putTo(HttpField field, ByteBuffer bufferInFillMode)
    • putTo

      public static void putTo(HttpFields.Mutable fields, ByteBuffer bufferInFillMode)