public class ANVLRecord extends java.util.LinkedList<Element> implements UTF8Bytes
List with 'data' Element values.
ANVLRecords end with a blank line.| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
CRLF
An ANVL 'newline'.
|
static ANVLRecord |
EMPTY_ANVL_RECORD |
protected static java.lang.String |
FOLD_PREFIX |
static long |
MAXIMUM_SIZE
Arbitrary upper bound on maximum size of ANVL Record.
|
static java.lang.String |
MIMETYPE |
| Constructor and Description |
|---|
ANVLRecord() |
ANVLRecord(java.util.Collection<? extends Element> c) |
ANVLRecord(int initialCapacity)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addLabel(java.lang.String l) |
boolean |
addLabelValue(java.lang.String l,
java.lang.String v) |
java.util.Map<java.lang.String,java.lang.String> |
asMap() |
ANVLRecord |
clone() |
int |
getLength() |
byte[] |
getUTF8Bytes() |
static boolean |
isCR(char c) |
static boolean |
isCROrLF(char c) |
static boolean |
isLF(char c) |
static ANVLRecord |
load(java.io.InputStream is)
Parses a single ANVLRecord from passed InputStream.
|
static ANVLRecord |
load(java.lang.String s)
Parse passed String for an ANVL Record.
|
java.lang.String |
toString() |
add, add, addAll, addAll, addFirst, addLast, clear, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, set, size, spliterator, toArray, toArrayequals, hashCode, listIterator, removeRange, subListcontainsAll, isEmpty, removeAll, retainAllfinalize, getClass, notify, notifyAll, wait, wait, waitpublic static final java.lang.String MIMETYPE
public static final ANVLRecord EMPTY_ANVL_RECORD
public static final long MAXIMUM_SIZE
protected static final java.lang.String CRLF
protected static final java.lang.String FOLD_PREFIX
public ANVLRecord()
public ANVLRecord(java.util.Collection<? extends Element> c)
public ANVLRecord(int initialCapacity)
public boolean addLabel(java.lang.String l)
public boolean addLabelValue(java.lang.String l,
java.lang.String v)
public java.lang.String toString()
toString in class java.util.AbstractCollection<Element>public java.util.Map<java.lang.String,java.lang.String> asMap()
public ANVLRecord clone()
clone in class java.util.LinkedList<Element>public byte[] getUTF8Bytes()
throws java.io.UnsupportedEncodingException
getUTF8Bytes in interface UTF8Bytesjava.io.UnsupportedEncodingExceptionpublic static ANVLRecord load(java.io.InputStream is) throws java.io.IOException
is - InputStreamjava.io.IOExceptionpublic static ANVLRecord load(java.lang.String s) throws java.io.IOException
s - String with an ANVLRecord.java.io.IOExceptionpublic int getLength()
public static boolean isCROrLF(char c)
public static boolean isCR(char c)
public static boolean isLF(char c)
Copyright © 2019 The International Internet Preservation Consortium. All Rights Reserved.