Package org.apache.http.config
Class MessageConstraints
- java.lang.Object
-
- org.apache.http.config.MessageConstraints
-
- All Implemented Interfaces:
java.lang.Cloneable
public class MessageConstraints extends java.lang.Object implements java.lang.CloneableHTTP Message constraints: line length and header count.Please note that line length is defined in bytes and not characters. This is only relevant however when using non-standard HTTP charsets for protocol elements such as UTF-8.
- Since:
- 4.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMessageConstraints.Builder
-
Field Summary
Fields Modifier and Type Field Description static MessageConstraintsDEFAULTprivate intmaxHeaderCountprivate intmaxLineLength
-
Constructor Summary
Constructors Constructor Description MessageConstraints(int maxLineLength, int maxHeaderCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MessageConstraintsclone()static MessageConstraints.Buildercopy(MessageConstraints config)static MessageConstraints.Buildercustom()intgetMaxHeaderCount()intgetMaxLineLength()static MessageConstraintslineLen(int max)java.lang.StringtoString()
-
-
-
Field Detail
-
DEFAULT
public static final MessageConstraints DEFAULT
-
maxLineLength
private final int maxLineLength
-
maxHeaderCount
private final int maxHeaderCount
-
-
Method Detail
-
getMaxLineLength
public int getMaxLineLength()
-
getMaxHeaderCount
public int getMaxHeaderCount()
-
clone
protected MessageConstraints clone() throws java.lang.CloneNotSupportedException
- Overrides:
clonein classjava.lang.Object- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
lineLen
public static MessageConstraints lineLen(int max)
-
custom
public static MessageConstraints.Builder custom()
-
copy
public static MessageConstraints.Builder copy(MessageConstraints config)
-
-