|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.http.message.BasicLineFormatterHC4
@Immutable public class BasicLineFormatterHC4
Interface for formatting elements of the HEAD section of an HTTP message.
This is the complement to LineParser.
There are individual methods for formatting a request line, a
status line, or a header line. The formatting does not include the
trailing line break sequence CR-LF.
The formatted lines are returned in memory, the formatter does not depend
on any specific IO mechanism.
Instances of this interface are expected to be stateless and thread-safe.
| Field Summary | |
|---|---|
static BasicLineFormatterHC4 |
DEFAULT
Deprecated. (4.3) use INSTANCE |
static BasicLineFormatterHC4 |
INSTANCE
|
| Constructor Summary | |
|---|---|
BasicLineFormatterHC4()
|
|
| Method Summary | |
|---|---|
org.apache.http.util.CharArrayBuffer |
appendProtocolVersion(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.ProtocolVersion version)
|
protected void |
doFormatHeader(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.Header header)
Actually formats a header. |
protected void |
doFormatRequestLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.RequestLine reqline)
Actually formats a request line. |
protected void |
doFormatStatusLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.StatusLine statline)
Actually formats a status line. |
protected int |
estimateProtocolVersionLen(org.apache.http.ProtocolVersion version)
Guesses the length of a formatted protocol version. |
org.apache.http.util.CharArrayBuffer |
formatHeader(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.Header header)
|
static java.lang.String |
formatHeader(org.apache.http.Header header,
org.apache.http.message.LineFormatter formatter)
Formats a header. |
static java.lang.String |
formatProtocolVersion(org.apache.http.ProtocolVersion version,
org.apache.http.message.LineFormatter formatter)
Formats a protocol version. |
org.apache.http.util.CharArrayBuffer |
formatRequestLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.RequestLine reqline)
|
static java.lang.String |
formatRequestLine(org.apache.http.RequestLine reqline,
org.apache.http.message.LineFormatter formatter)
Formats a request line. |
org.apache.http.util.CharArrayBuffer |
formatStatusLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.StatusLine statline)
|
static java.lang.String |
formatStatusLine(org.apache.http.StatusLine statline,
org.apache.http.message.LineFormatter formatter)
Formats a status line. |
protected org.apache.http.util.CharArrayBuffer |
initBuffer(org.apache.http.util.CharArrayBuffer charBuffer)
Obtains a buffer for formatting. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final BasicLineFormatterHC4 DEFAULT
INSTANCEBasicLineFormatter is not a singleton, there can
be many instances of the class itself and of derived classes.
The instance here provides non-customized, default behavior.
public static final BasicLineFormatterHC4 INSTANCE
| Constructor Detail |
|---|
public BasicLineFormatterHC4()
| Method Detail |
|---|
protected org.apache.http.util.CharArrayBuffer initBuffer(org.apache.http.util.CharArrayBuffer charBuffer)
charBuffer - a buffer already available, or null
public static java.lang.String formatProtocolVersion(org.apache.http.ProtocolVersion version,
org.apache.http.message.LineFormatter formatter)
version - the protocol version to formatformatter - the formatter to use, or
null for the
default
public org.apache.http.util.CharArrayBuffer appendProtocolVersion(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.ProtocolVersion version)
appendProtocolVersion in interface org.apache.http.message.LineFormatterprotected int estimateProtocolVersionLen(org.apache.http.ProtocolVersion version)
version - the protocol version to format, or null
public static java.lang.String formatRequestLine(org.apache.http.RequestLine reqline,
org.apache.http.message.LineFormatter formatter)
reqline - the request line to formatformatter - the formatter to use, or
null for the
default
public org.apache.http.util.CharArrayBuffer formatRequestLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.RequestLine reqline)
formatRequestLine in interface org.apache.http.message.LineFormatter
protected void doFormatRequestLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.RequestLine reqline)
formatRequestLine(org.apache.http.RequestLine, org.apache.http.message.LineFormatter).
buffer - the empty buffer into which to format,
never nullreqline - the request line to format, never null
public static java.lang.String formatStatusLine(org.apache.http.StatusLine statline,
org.apache.http.message.LineFormatter formatter)
statline - the status line to formatformatter - the formatter to use, or
null for the
default
public org.apache.http.util.CharArrayBuffer formatStatusLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.StatusLine statline)
formatStatusLine in interface org.apache.http.message.LineFormatter
protected void doFormatStatusLine(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.StatusLine statline)
formatStatusLine(org.apache.http.StatusLine, org.apache.http.message.LineFormatter).
buffer - the empty buffer into which to format,
never nullstatline - the status line to format, never null
public static java.lang.String formatHeader(org.apache.http.Header header,
org.apache.http.message.LineFormatter formatter)
header - the header to formatformatter - the formatter to use, or
null for the
default
public org.apache.http.util.CharArrayBuffer formatHeader(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.Header header)
formatHeader in interface org.apache.http.message.LineFormatter
protected void doFormatHeader(org.apache.http.util.CharArrayBuffer buffer,
org.apache.http.Header header)
formatHeader(org.apache.http.Header, org.apache.http.message.LineFormatter).
buffer - the empty buffer into which to format,
never nullheader - the header to format, never null
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||