|
1 | 1 | package org.codehaus.plexus.archiver.tar;
|
2 | 2 |
|
3 |
| -import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream; |
4 |
| -import org.apache.commons.io.IOUtils; |
5 |
| -import org.apache.commons.io.output.NullOutputStream; |
6 | 3 | import org.codehaus.plexus.PlexusTestCase;
|
7 | 4 | import org.codehaus.plexus.archiver.UnArchiver;
|
8 |
| -import org.codehaus.plexus.archiver.util.Streams; |
9 | 5 | import org.codehaus.plexus.components.io.fileselectors.FileSelector;
|
10 | 6 | import org.codehaus.plexus.components.io.fileselectors.IncludeExcludeFileSelector;
|
11 | 7 | import org.codehaus.plexus.util.FileUtils;
|
12 | 8 |
|
13 | 9 | import java.io.File;
|
14 |
| -import java.io.FileInputStream; |
15 |
| -import java.io.FileNotFoundException; |
16 |
| -import java.io.IOException; |
17 |
| -import java.io.InputStream; |
18 |
| -import java.io.OutputStream; |
19 | 10 |
|
20 | 11 | /**
|
21 | 12 | * @author <a href="mailto:[email protected]">Viktor Sadovnikov</a>
|
@@ -75,39 +66,4 @@ public void testSelectors()
|
75 | 66 | runUnarchiver( new FileSelector[]{ fileSelector }, new boolean[]{ true, false, false } );
|
76 | 67 | }
|
77 | 68 |
|
78 |
| - |
79 |
| - private InputStream fis() |
80 |
| - throws FileNotFoundException |
81 |
| - { |
82 |
| - File file = new File( "/Users/kristian/testFile.tar" ); |
83 |
| - return Streams.bufferedInputStream( new FileInputStream( file ) ); |
84 |
| - } |
85 |
| - |
86 |
| - private InputStream fisub() |
87 |
| - throws FileNotFoundException |
88 |
| - { |
89 |
| - File file = new File( "/Users/kristian/testFile.tar" ); |
90 |
| - return new FileInputStream( file ); |
91 |
| - } |
92 |
| - |
93 |
| - public void testStreams() |
94 |
| - throws IOException |
95 |
| - { |
96 |
| - long start = System.currentTimeMillis(); |
97 |
| - OutputStream bzin = new BZip2CompressorOutputStream( new NullOutputStream() ); |
98 |
| - IOUtils.copy( fis(), bzin ); |
99 |
| - System.out.println( "((System.currentTimeMillis() - start)) = " + ( ( System.currentTimeMillis() - start ) ) ); |
100 |
| - start = System.currentTimeMillis(); |
101 |
| - bzin = new BZip2CompressorOutputStream( new NullOutputStream() ); |
102 |
| - IOUtils.copy( fisub(), bzin ); |
103 |
| - System.out.println( "((System.currentTimeMillis() - start)) = " + ( ( System.currentTimeMillis() - start ) ) ); |
104 |
| - start = System.currentTimeMillis(); |
105 |
| - bzin = new BZip2CompressorOutputStream( new NullOutputStream() ); |
106 |
| - IOUtils.copy( fis(), bzin ); |
107 |
| - System.out.println( "((System.currentTimeMillis() - start)) = " + ( ( System.currentTimeMillis() - start ) ) ); |
108 |
| - start = System.currentTimeMillis(); |
109 |
| - bzin = new BZip2CompressorOutputStream( new NullOutputStream() ); |
110 |
| - IOUtils.copy( fisub(), bzin ); |
111 |
| - System.out.println( "((System.currentTimeMillis() - start)) = " + ( ( System.currentTimeMillis() - start ) ) ); |
112 |
| - } |
113 | 69 | }
|
0 commit comments