litesoft
@ 939
litesoft / trunk / Java / ScarPlus / src / com / esotericsoftware / filesystem / ZipFactory.java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
package com.esotericsoftware.filesystem; import java.io.*; import org.litesoft.core.typeutils.Objects; import java.util.*; import java.util.zip.*; import com.esotericsoftware.utils.*; public interface ZipFactory { ZipOutputStream createZOS( String pFilePath, List<FilePath> pPaths ); ZipEntry createZE( String pRelativePath ); public ZipFactory FOR_ZIPS = new ZipFactory() { @Override public ZipOutputStream createZOS( String pFilePath, List<FilePath> pPaths ) { return new ZipOutputStream( FileUtil.createBufferedFileOutputStream( pFilePath ) ); } @Override public ZipEntry createZE( String pRelativePath ) { return new ZipEntry( pRelativePath ); } }; } |