remove useless "throws IOException" declarations

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150404 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2004-08-07 11:19:29 +00:00
parent 18a4dc5dce
commit 26128272df
3 changed files with 11 additions and 12 deletions

View File

@ -156,37 +156,36 @@ public final class FSDirectory extends Directory {
} }
/** Returns an array of strings, one for each file in the directory. */ /** Returns an array of strings, one for each file in the directory. */
public final String[] list() throws IOException { public final String[] list() {
return directory.list(); return directory.list();
} }
/** Returns true iff a file with the given name exists. */ /** Returns true iff a file with the given name exists. */
public final boolean fileExists(String name) throws IOException { public final boolean fileExists(String name) {
File file = new File(directory, name); File file = new File(directory, name);
return file.exists(); return file.exists();
} }
/** Returns the time the named file was last modified. */ /** Returns the time the named file was last modified. */
public final long fileModified(String name) throws IOException { public final long fileModified(String name) {
File file = new File(directory, name); File file = new File(directory, name);
return file.lastModified(); return file.lastModified();
} }
/** Returns the time the named file was last modified. */ /** Returns the time the named file was last modified. */
public static final long fileModified(File directory, String name) public static final long fileModified(File directory, String name) {
throws IOException {
File file = new File(directory, name); File file = new File(directory, name);
return file.lastModified(); return file.lastModified();
} }
/** Set the modified time of an existing file to now. */ /** Set the modified time of an existing file to now. */
public void touchFile(String name) throws IOException { public void touchFile(String name) {
File file = new File(directory, name); File file = new File(directory, name);
file.setLastModified(System.currentTimeMillis()); file.setLastModified(System.currentTimeMillis());
} }
/** Returns the length in bytes of a file in the directory. */ /** Returns the length in bytes of a file in the directory. */
public final long fileLength(String name) throws IOException { public final long fileLength(String name) {
File file = new File(directory, name); File file = new File(directory, name);
return file.length(); return file.length();
} }
@ -347,7 +346,7 @@ public final class FSDirectory extends Directory {
} }
/** Closes the store to future operations. */ /** Closes the store to future operations. */
public final synchronized void close() throws IOException { public final synchronized void close() {
if (--refCount <= 0) { if (--refCount <= 0) {
synchronized (DIRECTORIES) { synchronized (DIRECTORIES) {
DIRECTORIES.remove(directory); DIRECTORIES.remove(directory);
@ -432,7 +431,7 @@ final class FSInputStream extends InputStream {
} }
/** Random-access methods */ /** Random-access methods */
protected final void seekInternal(long position) throws IOException { protected final void seekInternal(long position) {
} }
protected final void finalize() throws IOException { protected final void finalize() throws IOException {

View File

@ -149,7 +149,7 @@ public abstract class OutputStream {
* occur. * occur.
* @see #seek(long) * @see #seek(long)
*/ */
public final long getFilePointer() throws IOException { public final long getFilePointer() {
return bufferStart + bufferPosition; return bufferStart + bufferPosition;
} }

View File

@ -106,13 +106,13 @@ public final class RAMDirectory extends Directory {
} }
/** Returns the time the named file was last modified. */ /** Returns the time the named file was last modified. */
public final long fileModified(String name) throws IOException { public final long fileModified(String name) {
RAMFile file = (RAMFile)files.get(name); RAMFile file = (RAMFile)files.get(name);
return file.lastModified; return file.lastModified;
} }
/** Set the modified time of an existing file to now. */ /** Set the modified time of an existing file to now. */
public void touchFile(String name) throws IOException { public void touchFile(String name) {
// final boolean MONITOR = false; // final boolean MONITOR = false;
RAMFile file = (RAMFile)files.get(name); RAMFile file = (RAMFile)files.get(name);