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

  • Constructor Details

    • HttpGenerator

      public HttpGenerator()
    • HttpGenerator

      public HttpGenerator(boolean sendServerVersion, boolean sendXPoweredBy)
  • Method Details

    • setJettyVersion

      public static void setJettyVersion(String serverVersion)
    • reset

      public void reset()
    • 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
    • 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

      public static byte[] getReasonBuffer(int code)
    • 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)