diff --git a/proposal/myrmidon/src/java/org/apache/aut/vfs/FileContent.java b/proposal/myrmidon/src/java/org/apache/aut/vfs/FileContent.java index 7e920290d..ec684c794 100644 --- a/proposal/myrmidon/src/java/org/apache/aut/vfs/FileContent.java +++ b/proposal/myrmidon/src/java/org/apache/aut/vfs/FileContent.java @@ -9,9 +9,6 @@ package org.apache.aut.vfs; import java.io.InputStream; import java.io.OutputStream; -import java.io.Reader; -import java.io.Writer; -import java.sql.Date; /** * This interface is used to access the data content of a file. diff --git a/proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemException.java b/proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemException.java index 8e381c3cb..8ac918f29 100644 --- a/proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemException.java +++ b/proposal/myrmidon/src/java/org/apache/aut/vfs/FileSystemException.java @@ -16,8 +16,6 @@ import org.apache.avalon.framework.CascadingException; */ public class FileSystemException extends CascadingException { - private Throwable m_cause; - /** * Constructs exception with the specified detail message. * diff --git a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java b/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java index 94d0464e9..2e5543729 100644 --- a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java +++ b/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/AbstractFileObject.java @@ -534,6 +534,7 @@ public abstract class AbstractFileObject implements FileObject if( m_type == FileType.FOLDER ) { final String message = REZ.getString( "write-folder.error", m_name ); + throw new FileSystemException( message ); } if( m_type == null ) diff --git a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java b/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java index 416444a6d..7d257261a 100644 --- a/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java +++ b/proposal/myrmidon/src/java/org/apache/aut/vfs/provider/DefaultFileContent.java @@ -11,17 +11,12 @@ import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; -import java.io.InputStreamReader; import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.Writer; -import java.sql.Date; import org.apache.aut.vfs.FileContent; import org.apache.aut.vfs.FileObject; import org.apache.aut.vfs.FileSystemException; -import org.apache.avalon.excalibur.i18n.Resources; import org.apache.avalon.excalibur.i18n.ResourceManager; +import org.apache.avalon.excalibur.i18n.Resources; /** * The content of a file. @@ -275,7 +270,7 @@ public class DefaultFileContent implements FileContent /** * Reads bytes from this input stream.error occurs. */ - public int read( byte b[], int off, int len ) + public int read( byte[] buffer, int offset, int length ) throws IOException { if( _finished ) @@ -283,7 +278,7 @@ public class DefaultFileContent implements FileContent return -1; } - int nread = super.read( b, off, len ); + int nread = super.read( buffer, offset, length ); if( nread != -1 ) { return nread;