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.Cloneable
HTTP 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 class
MessageConstraints.Builder
-
Field Summary
Fields Modifier and Type Field Description static MessageConstraints
DEFAULT
private int
maxHeaderCount
private int
maxLineLength
-
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 MessageConstraints
clone()
static MessageConstraints.Builder
copy(MessageConstraints config)
static MessageConstraints.Builder
custom()
int
getMaxHeaderCount()
int
getMaxLineLength()
static MessageConstraints
lineLen(int max)
java.lang.String
toString()
-
-
-
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:
clone
in classjava.lang.Object
- Throws:
java.lang.CloneNotSupportedException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
lineLen
public static MessageConstraints lineLen(int max)
-
custom
public static MessageConstraints.Builder custom()
-
copy
public static MessageConstraints.Builder copy(MessageConstraints config)
-
-