|
@@ -23,20 +23,21 @@ import org.apache.avalon.excalibur.i18n.Resources; |
|
|
* |
|
|
* |
|
|
* @author Adam Murdoch |
|
|
* @author Adam Murdoch |
|
|
*/ |
|
|
*/ |
|
|
public class DefaultFileContent implements FileContent |
|
|
|
|
|
|
|
|
public class DefaultFileContent |
|
|
|
|
|
implements FileContent |
|
|
{ |
|
|
{ |
|
|
private static final Resources REZ |
|
|
|
|
|
= ResourceManager.getPackageResources( DefaultFileContent.class ); |
|
|
|
|
|
|
|
|
private final static Resources REZ = |
|
|
|
|
|
ResourceManager.getPackageResources( DefaultFileContent.class ); |
|
|
|
|
|
|
|
|
|
|
|
private final static int STATE_NONE = 0; |
|
|
|
|
|
private final static int STATE_READING = 1; |
|
|
|
|
|
private final static int STATE_WRITING = 2; |
|
|
|
|
|
|
|
|
private AbstractFileObject m_file; |
|
|
private AbstractFileObject m_file; |
|
|
private int _state = STATE_NONE; |
|
|
private int _state = STATE_NONE; |
|
|
private FileContentInputStream m_instr; |
|
|
private FileContentInputStream m_instr; |
|
|
private FileContentOutputStream m_outstr; |
|
|
private FileContentOutputStream m_outstr; |
|
|
|
|
|
|
|
|
private static final int STATE_NONE = 0; |
|
|
|
|
|
private static final int STATE_READING = 1; |
|
|
|
|
|
private static final int STATE_WRITING = 2; |
|
|
|
|
|
|
|
|
|
|
|
public DefaultFileContent( AbstractFileObject file ) |
|
|
public DefaultFileContent( AbstractFileObject file ) |
|
|
{ |
|
|
{ |
|
|
m_file = file; |
|
|
m_file = file; |
|
@@ -332,7 +333,8 @@ public class DefaultFileContent implements FileContent |
|
|
/** |
|
|
/** |
|
|
* An output stream for writing content. |
|
|
* An output stream for writing content. |
|
|
*/ |
|
|
*/ |
|
|
private final class FileContentOutputStream extends BufferedOutputStream |
|
|
|
|
|
|
|
|
private final class FileContentOutputStream |
|
|
|
|
|
extends BufferedOutputStream |
|
|
{ |
|
|
{ |
|
|
FileContentOutputStream( OutputStream outstr ) |
|
|
FileContentOutputStream( OutputStream outstr ) |
|
|
{ |
|
|
{ |
|
|