| org.archive.util.TmpDirTestCase org.archive.io.arc.ARCWriterTest
ARCWriterTest | public class ARCWriterTest extends TmpDirTestCase implements ARCConstants(Code) | | Test ARCWriter class.
This code exercises ARCWriter AND ARCReader. First it writes ARCs w/
ARCWriter. Then it validates what was written w/ ARCReader.
author: stack |
Method Summary | |
public static File | createARCFile(File arcdir, boolean compress) Write an arc file for other tests to use.
Parameters: arcdir - Directory to write to. Parameters: compress - True if file should be compressed. | protected ARCWriter | createARCWriter(String NAME, boolean compress) | protected ARCWriter | createArcWithOneRecord(String name, boolean compressed) | protected static ByteArrayOutputStream | getBaos(String str) | protected static String | getContent() | protected static String | getContent(String indexStr) | protected void | holeyUrl(String name, boolean compress, String urlInsert) | protected int | iterateRecords(ARCReader r) | protected void | lengthTooLong(String name, boolean compress, boolean strict) | protected void | lengthTooShort(String name, boolean compress, boolean strict) | protected void | setUp() | protected void | tearDown() | public void | testArcRecordOffsetReads() | public void | testCheckARCFileSize() | public void | testCheckARCFileSizeCompressed() | public void | testGapError() | public void | testLengthTooLongCompressed() | public void | testLengthTooLongCompressedStrict() | public void | testLengthTooShortCompressed() | public void | testLengthTooShortCompressedStrict() | public void | testRandomAccess() | public void | testSpaceInURL() | public void | testTabInURL() | public void | testValidateMetaLine() | public void | testWriteRecord() | public void | testWriteRecordCompressed() | protected int | writeRandomHTTPRecord(ARCWriter arcWriter, int index) | protected static void | writeRecord(ARCWriter writer, String url, String type, int len, ByteArrayOutputStream baos) |
createARCFile | public static File createARCFile(File arcdir, boolean compress) throws IOException(Code) | | Write an arc file for other tests to use.
Parameters: arcdir - Directory to write to. Parameters: compress - True if file should be compressed. ARC written. throws: IOException - |
lengthTooShort | protected void lengthTooShort(String name, boolean compress, boolean strict) throws IOException(Code) | | |
testArcRecordOffsetReads | public void testArcRecordOffsetReads() throws Exception(Code) | | |
testCheckARCFileSizeCompressed | public void testCheckARCFileSizeCompressed() throws IOException(Code) | | |
testLengthTooLongCompressed | public void testLengthTooLongCompressed() throws IOException(Code) | | |
testLengthTooLongCompressedStrict | public void testLengthTooLongCompressedStrict()(Code) | | |
testLengthTooShortCompressed | public void testLengthTooShortCompressed() throws IOException(Code) | | |
testLengthTooShortCompressedStrict | public void testLengthTooShortCompressedStrict() throws IOException(Code) | | |
testSpaceInURL | public void testSpaceInURL()(Code) | | |
testTabInURL | public void testTabInURL()(Code) | | |
testValidateMetaLine | public void testValidateMetaLine() throws Exception(Code) | | |
testWriteRecordCompressed | public void testWriteRecordCompressed() throws IOException(Code) | | |
|
|