|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| FileReader.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* EJTools, the Enterprise Java Tools
|
|
| 3 |
*
|
|
| 4 |
* Distributable under LGPL license.
|
|
| 5 |
* See terms of license at www.gnu.org.
|
|
| 6 |
*/
|
|
| 7 |
package org.ejtools.archive.io;
|
|
| 8 |
|
|
| 9 |
import java.io.File;
|
|
| 10 |
import java.io.FileInputStream;
|
|
| 11 |
import java.util.zip.ZipInputStream;
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
/**
|
|
| 15 |
* Reader implementation based on a File. The file is transformed into a stream.
|
|
| 16 |
*
|
|
| 17 |
* @author Laurent Etiemble
|
|
| 18 |
* @version $Revision: 1.2 $
|
|
| 19 |
*/
|
|
| 20 |
public class FileReader extends StreamReader |
|
| 21 |
{
|
|
| 22 |
/**
|
|
| 23 |
* Builds a FileReader on a File
|
|
| 24 |
*
|
|
| 25 |
* @param file The File to read
|
|
| 26 |
*/
|
|
| 27 | 0 |
public FileReader(File file)
|
| 28 |
{
|
|
| 29 | 0 |
try
|
| 30 |
{
|
|
| 31 | 0 |
FileInputStream fis = new FileInputStream(file);
|
| 32 | 0 |
this.pushZipInputStream(new ZipInputStream(fis)); |
| 33 |
} |
|
| 34 |
catch (Exception ioe)
|
|
| 35 |
{
|
|
| 36 | 0 |
ioe.printStackTrace(); |
| 37 |
} |
|
| 38 |
} |
|
| 39 |
} |
|
| 40 |
|
|
||||||||||