Top Description Inners Fields Constructors Methods
org.apache.tomcat.util.http.parser

public Class StructuredField

extends Object
Class Inheritance
Imports
java.io.IOException, .Reader, java.util.ArrayList, .LinkedHashMap, .List, .Map, org.apache.tomcat.util.codec.binary.Base64, org.apache.tomcat.util.res.StringManager

Parsing of structured fields as per RFC 8941.

The parsing implementation is complete but not all elements are currently exposed via getters. Additional getters will be added as required as the use of structured fields expands.

The serialization of structured fields has not been implemented.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv abstract static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
private static final int
private static final boolean[]
private static final boolean[]
private static final boolean[]
private static final boolean[]
private static final boolean[]
private static final StringManager

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static boolean
isBase64(int c)

pack-priv static boolean
isKey(int c)

pack-priv static boolean
isKeyFirst(int c)

pack-priv static boolean
isOws(int c)

pack-priv static boolean
isToken(int c)

pack-priv static StructuredField.SfItem<?>
pack-priv static StructuredField.SfBoolean
pack-priv static StructuredField.SfByteSequence
pack-priv static StructuredField.SfDictionary
pack-priv static StructuredField.SfInnerList
pack-priv static StructuredField.SfItem<?>
pack-priv static String
pack-priv static StructuredField.SfList
pack-priv static StructuredField.SfListMember
pack-priv static StructuredField.SfItem<?>
parseSfNumeric(Reader input, int first)

pack-priv static void
pack-priv static StructuredField.SfString
pack-priv static StructuredField.SfToken
parseSfToken(Reader input, int first)

pack-priv static int
peek(Reader input)

pack-priv static void
requireChar(Reader input, int... required)

pack-priv static void
requireNotChar(Reader input, int required)

pack-priv static void
skipOWS(Reader input)

pack-priv static void
skipSP(Reader input)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ARRAY_SIZEback to summary
private static final int ARRAY_SIZE
IS_BASE64back to summary
private static final boolean[] IS_BASE64
IS_KEYback to summary
private static final boolean[] IS_KEY
IS_KEY_FIRSTback to summary
private static final boolean[] IS_KEY_FIRST
IS_OWSback to summary
private static final boolean[] IS_OWS
IS_TOKENback to summary
private static final boolean[] IS_TOKEN
smback to summary
private static final StringManager sm

Constructor Detail

StructuredFieldback to summary
private StructuredField()

Method Detail

isBase64back to summary
pack-priv static boolean isBase64(int c)
isKeyback to summary
pack-priv static boolean isKey(int c)
isKeyFirstback to summary
pack-priv static boolean isKeyFirst(int c)
isOwsback to summary
pack-priv static boolean isOws(int c)
isTokenback to summary
pack-priv static boolean isToken(int c)
parseSfBareItemback to summary
pack-priv static StructuredField.SfItem<?> parseSfBareItem(Reader input) throws IOException
parseSfBooleanback to summary
pack-priv static StructuredField.SfBoolean parseSfBoolean(Reader input) throws IOException
parseSfByteSequenceback to summary
pack-priv static StructuredField.SfByteSequence parseSfByteSequence(Reader input) throws IOException
parseSfDictionaryback to summary
pack-priv static StructuredField.SfDictionary parseSfDictionary(Reader input) throws IOException
parseSfInnerListback to summary
pack-priv static StructuredField.SfInnerList parseSfInnerList(Reader input) throws IOException
parseSfItemback to summary
pack-priv static StructuredField.SfItem<?> parseSfItem(Reader input) throws IOException
parseSfKeyback to summary
pack-priv static String parseSfKey(Reader input) throws IOException
parseSfListback to summary
pack-priv static StructuredField.SfList parseSfList(Reader input) throws IOException
parseSfListMemberback to summary
pack-priv static StructuredField.SfListMember parseSfListMember(Reader input) throws IOException
parseSfNumericback to summary
pack-priv static StructuredField.SfItem<?> parseSfNumeric(Reader input, int first) throws IOException
parseSfParametersback to summary
pack-priv static void parseSfParameters(Reader input, StructuredField.SfListMember listMember) throws IOException
parseSfStringback to summary
pack-priv static StructuredField.SfString parseSfString(Reader input) throws IOException
parseSfTokenback to summary
pack-priv static StructuredField.SfToken parseSfToken(Reader input, int first) throws IOException
peekback to summary
pack-priv static int peek(Reader input) throws IOException
requireCharback to summary
pack-priv static void requireChar(Reader input, int... required) throws IOException
requireNotCharback to summary
pack-priv static void requireNotChar(Reader input, int required) throws IOException
skipOWSback to summary
pack-priv static void skipOWS(Reader input) throws IOException
skipSPback to summary
pack-priv static void skipSP(Reader input) throws IOException
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfBoolean

extends StructuredField.SfItem<Boolean>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv
SfBoolean(boolean value)

Method Summary

Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfItem:
getVaue

Constructor Detail

SfBooleanback to summary
pack-priv SfBoolean(boolean value)
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfByteSequence

extends StructuredField.SfItem<byte[]>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv
SfByteSequence(byte[] value)

Method Summary

Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfItem:
getVaue

Constructor Detail

SfByteSequenceback to summary
pack-priv SfByteSequence(byte[] value)
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfDecimal

extends StructuredField.SfItem<Double>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv
SfDecimal(double value)

Method Summary

Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfItem:
getVaue

Constructor Detail

SfDecimalback to summary
pack-priv SfDecimal(double value)
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfDictionary

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.tomcat.util.http.parser.StructuredField.SfDictionary

Field Summary

Modifier and TypeField and Description
private Map<String, StructuredField.SfListMember>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv StructuredField.SfListMember
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dictionaryback to summary
private Map<String, StructuredField.SfListMember> dictionary

Constructor Detail

SfDictionaryback to summary
pack-priv SfDictionary()

Method Detail

addDictionaryMemberback to summary
pack-priv void addDictionaryMember(String key, StructuredField.SfListMember value)
getDictionaryMemberback to summary
pack-priv StructuredField.SfListMember getDictionaryMember(String key)
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfInnerList

extends SfListMember
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv List<StructuredField.SfItem<?>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv List<StructuredField.SfItem<?>>
Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfListMember:
addParameter

Field Detail

listItemsback to summary
pack-priv List<StructuredField.SfItem<?>> listItems

Constructor Detail

SfInnerListback to summary
pack-priv SfInnerList()

Method Detail

addListItemback to summary
pack-priv void addListItem(StructuredField.SfItem<?> item)
getListItemback to summary
pack-priv List<StructuredField.SfItem<?>> getListItem()
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfInteger

extends StructuredField.SfItem<Long>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv
SfInteger(long value)

Method Summary

Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfItem:
getVaue

Constructor Detail

SfIntegerback to summary
pack-priv SfInteger(long value)
org.apache.tomcat.util.http.parser back to summary

pack-priv abstract Class StructuredField.SfItem<T>

extends SfListMember
Class Inheritance
Known Direct Subclasses
org.apache.tomcat.util.http.parser.StructuredField.SfInteger, org.apache.tomcat.util.http.parser.StructuredField.SfDecimal, org.apache.tomcat.util.http.parser.StructuredField.SfString, org.apache.tomcat.util.http.parser.StructuredField.SfToken, org.apache.tomcat.util.http.parser.StructuredField.SfByteSequence, org.apache.tomcat.util.http.parser.StructuredField.SfBoolean

Field Summary

Modifier and TypeField and Description
private final T

Constructor Summary

AccessConstructor and Description
pack-priv
SfItem(T value)

Method Summary

Modifier and TypeMethod and Description
pack-priv T
Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfListMember:
addParameter

Field Detail

valueback to summary
private final T value

Constructor Detail

SfItemback to summary
pack-priv SfItem(T value)

Method Detail

getVaueback to summary
pack-priv T getVaue()
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfList

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private List<StructuredField.SfListMember>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

listMembersback to summary
private List<StructuredField.SfListMember> listMembers

Constructor Detail

SfListback to summary
pack-priv SfList()

Method Detail

addListMemberback to summary
pack-priv void addListMember(StructuredField.SfListMember listMember)
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfListMember

extends Object
Class Inheritance
  • java.lang.Object
  • org.apache.tomcat.util.http.parser.StructuredField.SfListMember
Known Direct Subclasses
org.apache.tomcat.util.http.parser.StructuredField.SfInnerList, org.apache.tomcat.util.http.parser.StructuredField.SfItem

Field Summary

Modifier and TypeField and Description
private Map<String, StructuredField.SfItem<?>>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

parametersback to summary
private Map<String, StructuredField.SfItem<?>> parameters

Constructor Detail

SfListMemberback to summary
pack-priv SfListMember()

Method Detail

addParameterback to summary
pack-priv void addParameter(String key, StructuredField.SfItem<?> value)
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfString

extends StructuredField.SfItem<String>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfItem:
getVaue

Constructor Detail

SfStringback to summary
pack-priv SfString(String value)
org.apache.tomcat.util.http.parser back to summary

pack-priv Class StructuredField.SfToken

extends StructuredField.SfItem<String>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv
SfToken(String value)

Method Summary

Inherited from org.apache.tomcat.util.http.parser.StructuredField.SfItem:
getVaue

Constructor Detail

SfTokenback to summary
pack-priv SfToken(String value)