public class LanguageList extends Chunk
Modifier and Type | Field and Description |
---|---|
private java.util.List<java.lang.String> |
languages
List of language codes, complying RFC-1766
|
chunkLength, guid, position
Constructor and Description |
---|
LanguageList()
Creates a new instance.
|
LanguageList(long pos,
java.math.BigInteger size)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addLanguage(java.lang.String language)
This method adds a language.
|
java.lang.String |
getLanguage(int index)
Returns the language code at the specified index.
|
int |
getLanguageCount()
Returns the amount of stored language codes.
|
java.util.List<java.lang.String> |
getLanguages()
Returns all language codes in list.
|
java.lang.String |
prettyPrint(java.lang.String prefix)
This method creates a String containing useful information prepared to be
printed on STD-OUT.
|
void |
removeLanguage(int index)
Removes the language entry at specified index.
|
getChunckEnd, getChunkEnd, getChunkLength, getGuid, getPosition, setPosition, toString
private final java.util.List<java.lang.String> languages
public LanguageList()
public LanguageList(long pos, java.math.BigInteger size)
pos
- position within the ASF file.size
- size of the chunkpublic void addLanguage(java.lang.String language)
language
- language codepublic java.lang.String getLanguage(int index)
index
- the index of the language code to get.public int getLanguageCount()
public java.util.List<java.lang.String> getLanguages()
public java.lang.String prettyPrint(java.lang.String prefix)
prettyPrint
in class Chunk
prefix
- each line gets this string prepended.public void removeLanguage(int index)
index
- index of language to remove.Copyright © 2005-2013 java.net. All Rights Reserved.