|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| ReaderFile.java | - | 0% | 0% | 0% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* Copyright (c) 2001-2003 The XDoclet team
|
|
| 3 |
* All rights reserved.
|
|
| 4 |
*/
|
|
| 5 |
package xjavadoc.filesystem;
|
|
| 6 |
|
|
| 7 |
import java.io.Reader;
|
|
| 8 |
import java.io.IOException;
|
|
| 9 |
import java.io.Writer;
|
|
| 10 |
import java.io.OutputStream;
|
|
| 11 |
import java.io.FileNotFoundException;
|
|
| 12 |
import java.io.UnsupportedEncodingException;
|
|
| 13 |
|
|
| 14 |
/**
|
|
| 15 |
* @created September 25, 2002
|
|
| 16 |
*/
|
|
| 17 |
public class ReaderFile implements AbstractFile |
|
| 18 |
{
|
|
| 19 |
private Reader file;
|
|
| 20 |
|
|
| 21 | 0 |
public ReaderFile( Reader file )
|
| 22 |
{
|
|
| 23 | 0 |
this.file = file;
|
| 24 |
} |
|
| 25 |
|
|
| 26 | 0 |
public Reader getReader() throws IOException |
| 27 |
{
|
|
| 28 | 0 |
return file;
|
| 29 |
} |
|
| 30 |
|
|
| 31 | 0 |
public Reader getReader(String enc) throws UnsupportedEncodingException, FileNotFoundException |
| 32 |
{
|
|
| 33 |
// Takashi: what to do here?
|
|
| 34 |
// if (enc!=null)
|
|
| 35 |
// {
|
|
| 36 |
// return new InputStreamReader(new FileInputStream(file),enc);
|
|
| 37 |
// }
|
|
| 38 |
// else
|
|
| 39 |
// {
|
|
| 40 |
// return new InputStreamReader(new FileInputStream(file));
|
|
| 41 |
// }
|
|
| 42 | 0 |
return file;
|
| 43 |
} |
|
| 44 |
|
|
| 45 | 0 |
public Writer getWriter() throws IOException |
| 46 |
{
|
|
| 47 | 0 |
throw new IOException("Not supported"); |
| 48 |
} |
|
| 49 |
|
|
| 50 | 0 |
public boolean isWriteable() |
| 51 |
{
|
|
| 52 | 0 |
return false; |
| 53 |
} |
|
| 54 |
|
|
| 55 | 0 |
public OutputStream getOutputStream() throws FileNotFoundException |
| 56 |
{
|
|
| 57 | 0 |
throw new FileNotFoundException("Not supported"); |
| 58 |
} |
|
| 59 |
|
|
| 60 | 0 |
public String getPath()
|
| 61 |
{
|
|
| 62 | 0 |
throw new RuntimeException("Not supported"); |
| 63 |
} |
|
| 64 |
|
|
| 65 | 0 |
public long lastModified() |
| 66 |
{
|
|
| 67 | 0 |
return Long.MIN_VALUE;
|
| 68 |
} |
|
| 69 |
|
|
| 70 | 0 |
public String toString()
|
| 71 |
{
|
|
| 72 | 0 |
return super.toString(); |
| 73 |
} |
|
| 74 |
} |
|
| 75 |
|
|
||||||||||