Author: sebb
Date: Sun Nov 7 18:29:12 2010
New Revision: 1032339
URL: http://svn.apache.org/viewvc?rev=1032339&view=rev
Log:
Add @Override markers for sandbox module
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/RACRandomAccessFile.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileObject.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileProvider.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileSystem.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileName.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileObject.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileProvider.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileRandomAccessContent.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/util/SharedRandomContentInputStream.java
commons/proper/vfs/trunk/sandbox/src/test/java/org/apache/commons/vfs/provider/smb/test/SmbProviderTestCase.java
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/RACRandomAccessFile.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/RACRandomAccessFile.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/RACRandomAccessFile.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/RACRandomAccessFile.java
Sun Nov 7 18:29:12 2010
@@ -65,21 +65,25 @@ public class RACRandomAccessFile extends
deleteTempFile(tempFile);
}
+ @Override
public long getFilePointer() throws IOException
{
return this.rac.getFilePointer();
}
+ @Override
public void seek(long pos) throws IOException
{
this.rac.seek(pos);
}
+ @Override
public int skipBytes(int n) throws IOException
{
return this.rac.skipBytes(n);
}
+ @Override
public long length() throws IOException
{
return this.rac.length();
@@ -88,6 +92,7 @@ public class RACRandomAccessFile extends
/* (non-Javadoc)
* @see org.ecc.base.io.FilterRandomAccessFile#setLength(long)
*/
+ @Override
public void setLength(long newLength) throws IOException
{
throw new IOException("Underlying RandomAccessContent instance length
cannot be modified.");
@@ -98,6 +103,7 @@ public class RACRandomAccessFile extends
return this.rac.getInputStream();
}
+ @Override
public void close() throws IOException
{
this.rac.close();
@@ -107,6 +113,7 @@ public class RACRandomAccessFile extends
/**
* @see java.io.RandomAccessFile#read(byte[])
*/
+ @Override
public final int read(byte[] b) throws IOException
{
return read(b, 0, b.length);
@@ -115,6 +122,7 @@ public class RACRandomAccessFile extends
/**
* @see java.io.RandomAccessFile#read()
*/
+ @Override
public final int read() throws IOException
{
final byte[] buf = this.singleByteBuf;
@@ -122,6 +130,7 @@ public class RACRandomAccessFile extends
return count < 0 ? -1 : (buf[0] & 0xFF);
}
+ @Override
public int read(byte[] b, int off, int len) throws IOException
{
this.rac.readFully(b, off, len);
@@ -131,6 +140,7 @@ public class RACRandomAccessFile extends
/**
* @see java.io.RandomAccessFile#write(int)
*/
+ @Override
public final void write(int b) throws IOException
{
final byte[] buf = this.singleByteBuf;
@@ -141,6 +151,7 @@ public class RACRandomAccessFile extends
/**
* @see java.io.RandomAccessFile#write(byte[])
*/
+ @Override
public final void write(byte[] b) throws IOException
{
write(b, 0, b.length);
@@ -149,6 +160,7 @@ public class RACRandomAccessFile extends
/**
* @see java.io.RandomAccessFile#write(byte[],int,int)
*/
+ @Override
public void write(byte[] b, int off, int len) throws IOException
{
this.rac.write(b, off, len);
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileObject.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileObject.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileObject.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileObject.java
Sun Nov 7 18:29:12 2010
@@ -64,6 +64,7 @@ public class MimeFileObject
/**
* Attaches this file object to its file resource.
*/
+ @Override
protected void doAttach() throws Exception
{
if (part == null)
@@ -115,6 +116,7 @@ public class MimeFileObject
return null;
}
+ @Override
protected void doDetach() throws Exception
{
}
@@ -123,6 +125,7 @@ public class MimeFileObject
* Determines the type of the file, returns null if the file does not
* exist.
*/
+ @Override
protected FileType doGetType() throws Exception
{
if (part == null)
@@ -139,6 +142,7 @@ public class MimeFileObject
return FileType.FILE;
}
+ @Override
protected String[] doListChildren() throws Exception
{
return null;
@@ -148,6 +152,7 @@ public class MimeFileObject
* Lists the children of the file. Is only called if {...@link #doGetType}
* returns {...@link org.apache.commons.vfs.FileType#FOLDER}.
*/
+ @Override
protected FileObject[] doListChildrenResolved() throws Exception
{
if (part == null)
@@ -196,6 +201,7 @@ public class MimeFileObject
/**
* Returns the size of the file content (in bytes).
*/
+ @Override
protected long doGetContentSize() throws Exception
{
return part.getSize();
@@ -204,6 +210,7 @@ public class MimeFileObject
/**
* Returns the last modified time of this file.
*/
+ @Override
protected long doGetLastModifiedTime()
throws Exception
{
@@ -236,6 +243,7 @@ public class MimeFileObject
/**
* Creates an input stream to read the file content from.
*/
+ @Override
protected InputStream doGetInputStream() throws Exception
{
if (isMultipart())
@@ -258,6 +266,7 @@ public class MimeFileObject
return part.getContentType() != null &&
part.getContentType().startsWith("multipart/");
}
+ @Override
protected FileContentInfoFactory getFileContentInfoFactory()
{
return new MimeFileContentInfoFactory();
@@ -277,6 +286,7 @@ public class MimeFileObject
* <li>java.utils.List of java.lang.Strings for entries with multiple
values</li>
* </ul>
*/
+ @Override
protected Map doGetAttributes() throws Exception
{
if (attributeMap == null)
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileProvider.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileProvider.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileProvider.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileProvider.java
Sun Nov 7 18:29:12 2010
@@ -59,6 +59,7 @@ public class MimeFileProvider
/**
* Creates the filesystem.
*/
+ @Override
protected FileSystem doCreateFileSystem(String scheme, final FileObject
file, final FileSystemOptions fileSystemOptions)
throws FileSystemException
{
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileSystem.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileSystem.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileSystem.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/mime/MimeFileSystem.java
Sun Nov 7 18:29:12 2010
@@ -60,6 +60,7 @@ public class MimeFileSystem
/**
* Creates a file object.
*/
+ @Override
protected FileObject createFile(final FileName name) throws
FileSystemException
{
return new MimeFileObject(name, null, this);
@@ -68,12 +69,14 @@ public class MimeFileSystem
/**
* Returns the capabilities of this file system.
*/
+ @Override
protected void addCapabilities(final Collection caps)
{
caps.addAll(MimeFileProvider.capabilities);
}
+ @Override
protected void doCloseCommunicationLink()
{
try
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileName.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileName.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileName.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileName.java
Sun Nov 7 18:29:12 2010
@@ -63,6 +63,7 @@ public class SmbFileName
/**
* Builds the root URI for this file name.
*/
+ @Override
protected void appendRootUri(final StringBuffer buffer, boolean
addPassword)
{
super.appendRootUri(buffer, addPassword);
@@ -73,6 +74,7 @@ public class SmbFileName
/**
* put domain before username if both are set
*/
+ @Override
protected void appendCredentials(StringBuffer buffer, boolean addPassword)
{
if (getDomain() != null && getDomain().length() != 0 &&
@@ -87,6 +89,7 @@ public class SmbFileName
/**
* Factory method for creating name instances.
*/
+ @Override
public FileName createName(final String path, FileType type)
{
return new SmbFileName(
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileNameParser.java
Sun Nov 7 18:29:12 2010
@@ -41,6 +41,7 @@ public class SmbFileNameParser extends U
return INSTANCE;
}
+ @Override
public FileName parseUri(final VfsComponentContext context, FileName base,
final String filename) throws FileSystemException
{
final StringBuffer name = new StringBuffer();
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileObject.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileObject.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileObject.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileObject.java
Sun Nov 7 18:29:12 2010
@@ -54,6 +54,7 @@ public class SmbFileObject
/**
* Attaches this file object to its file resource.
*/
+ @Override
protected void doAttach() throws Exception
{
// Defer creation of the SmbFile to here
@@ -63,6 +64,7 @@ public class SmbFileObject
}
}
+ @Override
protected void doDetach() throws Exception
{
// file closed through content-streams
@@ -118,6 +120,7 @@ public class SmbFileObject
* Determines the type of the file, returns null if the file does not
* exist.
*/
+ @Override
protected FileType doGetType() throws Exception
{
if (!file.exists())
@@ -140,6 +143,7 @@ public class SmbFileObject
* Lists the children of the file. Is only called if {...@link #doGetType}
* returns {...@link FileType#FOLDER}.
*/
+ @Override
protected String[] doListChildren() throws Exception
{
// VFS-210: do not try to get listing for anything else than
directories
@@ -154,6 +158,7 @@ public class SmbFileObject
/**
* Determines if this file is hidden.
*/
+ @Override
protected boolean doIsHidden() throws Exception
{
return file.isHidden();
@@ -162,11 +167,13 @@ public class SmbFileObject
/**
* Deletes the file.
*/
+ @Override
protected void doDelete() throws Exception
{
file.delete();
}
+ @Override
protected void doRename(FileObject newfile) throws Exception
{
file.renameTo(createSmbFile(newfile.getName()));
@@ -175,6 +182,7 @@ public class SmbFileObject
/**
* Creates this file as a folder.
*/
+ @Override
protected void doCreateFolder() throws Exception
{
file.mkdir();
@@ -184,6 +192,7 @@ public class SmbFileObject
/**
* Returns the size of the file content (in bytes).
*/
+ @Override
protected long doGetContentSize() throws Exception
{
return file.length();
@@ -192,6 +201,7 @@ public class SmbFileObject
/**
* Returns the last modified time of this file.
*/
+ @Override
protected long doGetLastModifiedTime()
throws Exception
{
@@ -201,6 +211,7 @@ public class SmbFileObject
/**
* Creates an input stream to read the file content from.
*/
+ @Override
protected InputStream doGetInputStream() throws Exception
{
try
@@ -225,6 +236,7 @@ public class SmbFileObject
/**
* Creates an output stream to write the file content to.
*/
+ @Override
protected OutputStream doGetOutputStream(boolean bAppend) throws Exception
{
return new SmbFileOutputStream(file, bAppend);
@@ -233,6 +245,7 @@ public class SmbFileObject
/**
* random access
*/
+ @Override
protected RandomAccessContent doGetRandomAccessContent(final
RandomAccessMode mode) throws Exception
{
return new SmbFileRandomAccessContent(file, mode);
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileProvider.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileProvider.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileProvider.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileProvider.java
Sun Nov 7 18:29:12 2010
@@ -69,6 +69,7 @@ public class SmbFileProvider
/**
* Creates the filesystem.
*/
+ @Override
protected FileSystem doCreateFileSystem(final FileName name, final
FileSystemOptions fileSystemOptions)
throws FileSystemException
{
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileRandomAccessContent.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileRandomAccessContent.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileRandomAccessContent.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileRandomAccessContent.java
Sun Nov 7 18:29:12 2010
@@ -48,32 +48,38 @@ class SmbFileRandomAccessContent extends
raf = new SmbRandomAccessFile(smbFile, mode.getModeString());
rafis = new InputStream()
{
+ @Override
public int read() throws IOException
{
return raf.readByte();
}
+ @Override
public long skip(long n) throws IOException
{
raf.seek(raf.getFilePointer() + n);
return n;
}
+ @Override
public void close() throws IOException
{
raf.close();
}
+ @Override
public int read(byte b[]) throws IOException
{
return raf.read(b);
}
+ @Override
public int read(byte b[], int off, int len) throws IOException
{
return raf.read(b, off, len);
}
+ @Override
public int available() throws IOException
{
long available = raf.length() - raf.getFilePointer();
@@ -190,71 +196,85 @@ class SmbFileRandomAccessContent extends
return raf.readUTF();
}
+ @Override
public void writeDouble(double v) throws IOException
{
raf.writeDouble(v);
}
+ @Override
public void writeFloat(float v) throws IOException
{
raf.writeFloat(v);
}
+ @Override
public void write(int b) throws IOException
{
raf.write(b);
}
+ @Override
public void writeByte(int v) throws IOException
{
raf.writeByte(v);
}
+ @Override
public void writeChar(int v) throws IOException
{
raf.writeChar(v);
}
+ @Override
public void writeInt(int v) throws IOException
{
raf.writeInt(v);
}
+ @Override
public void writeShort(int v) throws IOException
{
raf.writeShort(v);
}
+ @Override
public void writeLong(long v) throws IOException
{
raf.writeLong(v);
}
+ @Override
public void writeBoolean(boolean v) throws IOException
{
raf.writeBoolean(v);
}
+ @Override
public void write(byte b[]) throws IOException
{
raf.write(b);
}
+ @Override
public void write(byte b[], int off, int len) throws IOException
{
raf.write(b, off, len);
}
+ @Override
public void writeBytes(String s) throws IOException
{
raf.writeBytes(s);
}
+ @Override
public void writeChars(String s) throws IOException
{
raf.writeChars(s);
}
+ @Override
public void writeUTF(String str) throws IOException
{
raf.writeUTF(str);
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/provider/smb/SmbFileSystem.java
Sun Nov 7 18:29:12 2010
@@ -43,6 +43,7 @@ public class SmbFileSystem
/**
* Creates a file object.
*/
+ @Override
protected FileObject createFile(final FileName name) throws
FileSystemException
{
return new SmbFileObject(name, this);
@@ -51,6 +52,7 @@ public class SmbFileSystem
/**
* Returns the capabilities of this file system.
*/
+ @Override
protected void addCapabilities(final Collection caps)
{
caps.addAll(SmbFileProvider.capabilities);
Modified:
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/util/SharedRandomContentInputStream.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/util/SharedRandomContentInputStream.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/util/SharedRandomContentInputStream.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/main/java/org/apache/commons/vfs/util/SharedRandomContentInputStream.java
Sun Nov 7 18:29:12 2010
@@ -70,6 +70,7 @@ public class SharedRandomContentInputStr
}
+ @Override
public synchronized int read() throws IOException
{
if (checkEnd())
@@ -82,6 +83,7 @@ public class SharedRandomContentInputStr
return r;
}
+ @Override
public synchronized int read(byte b[], int off, int len) throws IOException
{
if (checkEnd())
@@ -101,6 +103,7 @@ public class SharedRandomContentInputStr
return nread;
}
+ @Override
public synchronized long skip(long n) throws IOException
{
if (checkEnd())
@@ -159,12 +162,14 @@ public class SharedRandomContentInputStr
return getFilePosition()+nadd;
}
+ @Override
public synchronized void mark(int readlimit)
{
super.mark(readlimit);
resetCount = 0;
}
+ @Override
public synchronized void reset() throws IOException
{
super.reset();
@@ -178,6 +183,7 @@ public class SharedRandomContentInputStr
}
+ @Override
public void close() throws IOException
{
super.close();
Modified:
commons/proper/vfs/trunk/sandbox/src/test/java/org/apache/commons/vfs/provider/smb/test/SmbProviderTestCase.java
URL:
http://svn.apache.org/viewvc/commons/proper/vfs/trunk/sandbox/src/test/java/org/apache/commons/vfs/provider/smb/test/SmbProviderTestCase.java?rev=1032339&r1=1032338&r2=1032339&view=diff
==============================================================================
---
commons/proper/vfs/trunk/sandbox/src/test/java/org/apache/commons/vfs/provider/smb/test/SmbProviderTestCase.java
(original)
+++
commons/proper/vfs/trunk/sandbox/src/test/java/org/apache/commons/vfs/provider/smb/test/SmbProviderTestCase.java
Sun Nov 7 18:29:12 2010
@@ -50,6 +50,7 @@ public class SmbProviderTestCase
/**
* Prepares the file system manager.
*/
+ @Override
public void prepare(final DefaultFileSystemManager manager)
throws Exception
{
@@ -59,6 +60,7 @@ public class SmbProviderTestCase
/**
* Returns the base folder for tests.
*/
+ @Override
public FileObject getBaseTestFolder(final FileSystemManager manager)
throws Exception
{
final String uri = System.getProperty(TEST_URI);