KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > schlichtherle > io > RandomDataTarBZip2Test


1 /*
2  * RandomDataTarGZipTest.java
3  *
4  * Created on 14. Oktober 2005, 16:49
5  */

6 /*
7  * Copyright 2005 Schlichtherle IT Services
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */

21
22 package de.schlichtherle.io;
23
24 import de.schlichtherle.io.archive.tar.TarBZip2Driver;
25
26 import junit.framework.*;
27
28 import org.apache.tools.bzip2.CBZip2OutputStream;
29
30 /**
31  * Tests the TrueZIP API in de.schlichtherle.io with the TAR.BZ2 driver.
32  *
33  * @author Christian Schlichtherle
34  * @version @version@
35  * @since TrueZIP 6.0
36  */

37 public class RandomDataTarBZip2Test extends FileTestBase {
38
39     public static Test suite() throws Exception JavaDoc {
40         TestSuite suite = new TestSuite(RandomDataTarBZip2Test.class);
41         /*TestSuite suite = new TestSuite();
42         suite.addTest(new RandomDataTarBZip2Test("testMultithreadedMultipleArchivesSingleEntryWriting"));*/

43         
44         return suite;
45     }
46
47     /**
48      * Creates a new instance of RandomDataZip32Test
49      */

50     public RandomDataTarBZip2Test(String JavaDoc testName) {
51         super(testName);
52     }
53
54     protected void setUp() throws Exception JavaDoc {
55         suffix = ".tar.bz2";
56         // We want to test TrueZIP with this driver, not the memory
57
// consumption of CBZip2(In|Out)putStream, so we set the block size
58
// to its minimum in order to prevent OOME's with the default JVM max
59
// memory settings.
60
File.setDefaultArchiveDetector(new DefaultArchiveDetector(
61                 "tar.bz2", new TarBZip2Driver(1)));
62
63         super.setUp();
64     }
65 }
66
Popular Tags