Package org.vafer.jdeb.debian
Class ControlFile
java.lang.Object
org.vafer.jdeb.debian.ControlFile
- Direct Known Subclasses:
BinaryPackageControlFile,ChangesFile
A control file as specified by the Debian policy.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ControlField[]protected abstract charReturns the letter expected in the prefix of a user defined field in order to include the field in this control file.protected StringgetUserDefinedFieldName(String field)Returns the user defined field without its prefix.protected Set<ControlField>protected booleanisUserDefinedField(String field)Tells if the specified field name is a user defined field.booleanisValid()voidparse(InputStream input)voidvoidtoString()toString(ControlField... fields)
-
Field Details
-
values
-
userDefinedFields
-
userDefinedFieldNames
-
-
Constructor Details
-
ControlFile
public ControlFile()
-
-
Method Details
-
parse
- Throws:
IOExceptionParseException
-
parse
- Throws:
IOExceptionParseException
-
set
-
get
-
getFields
-
getUserDefinedFields
-
getUserDefinedFieldNames
-
getMandatoryFields
-
isValid
-
invalidFields
-
toString
-
toString
-
getUserDefinedFieldLetter
Returns the letter expected in the prefix of a user defined field in order to include the field in this control file.- Returns:
- The letter returned is:
- B: for a binary package
- S: for a source package
- C: for a changes file
- Since:
- 1.1
- See Also:
- Debian Policy - User-defined fields
-
isUserDefinedField
Tells if the specified field name is a user defined field. User-defined fields must begin with an 'X', followed by one or more letters that specify the output file and a hyphen.- Parameters:
field- the name of the field- Since:
- 1.1
- See Also:
- Debian Policy - User-defined fields
-
getUserDefinedFieldName
Returns the user defined field without its prefix.- Parameters:
field- the name of the user defined field- Returns:
- the user defined field without the prefix, or null if the fields doesn't apply to this control file.
- Since:
- 1.1
-