1 23 package org.archive.util.anvl; 24 25 import java.io.UnsupportedEncodingException ; 26 import java.util.ArrayList ; 27 import java.util.Collection ; 28 import java.util.Iterator ; 29 30 import org.archive.io.UTF8Bytes; 31 32 37 public class ANVLRecords extends ArrayList <ANVLRecord> implements UTF8Bytes { 38 private static final long serialVersionUID = 5361551920550106113L; 39 40 public ANVLRecords() { 41 super(); 42 } 43 44 public ANVLRecords(int initialCapacity) { 45 super(initialCapacity); 46 } 47 48 public ANVLRecords(Collection <ANVLRecord> c) { 49 super(c); 50 } 51 52 public byte[] getUTF8Bytes() throws UnsupportedEncodingException { 53 return toString().getBytes(UTF8); 54 } 55 56 @Override 57 public String toString() { 58 StringBuilder sb = new StringBuilder (); 59 for (final Iterator i = iterator(); i.hasNext();) { 60 sb.append(i.next().toString()); 61 } 62 return super.toString(); 63 } 64 } | Popular Tags |