You are probably likely to do this sooner than I am. Feel free.
Here you go. Is it OK?
thanks -mike
diff -u "c:/lucene-1.4-final/src/java/org/apache/lucene/store/FSDirectory.java.old" "c:/lucene-1.4-final/src/java/org/apache/lucene/store/FSDirectory.java" --- c:/lucene-1.4-final/src/java/org/apache/lucene/store/FSDirectory.java.old 2004-05-25 11:57:26.000000000 +0100 +++ c:/lucene-1.4-final/src/java/org/apache/lucene/store/FSDirectory.java 2004-09-02 15:20:42.685633300 +0100 @@ -35,7 +35,7 @@ * @see Directory * @author Doug Cutting */ -public final class FSDirectory extends Directory { +public class FSDirectory extends Directory { /** This cache of directories ensures that there is a unique Directory * instance per path, so that synchronization on the Directory can be used to * synchronize access between readers and writers. @@ -156,24 +156,24 @@ } /** Returns an array of strings, one for each file in the directory. */ - public final String[] list() throws IOException { + public String[] list() throws IOException { return directory.list(); } /** Returns true iff a file with the given name exists. */ - public final boolean fileExists(String name) throws IOException { + public boolean fileExists(String name) throws IOException { File file = new File(directory, name); return file.exists(); } /** Returns the time the named file was last modified. */ - public final long fileModified(String name) throws IOException { + public long fileModified(String name) throws IOException { File file = new File(directory, name); return file.lastModified(); } /** Returns the time the named file was last modified. */ - public static final long fileModified(File directory, String name) + public static long fileModified(File directory, String name) throws IOException { File file = new File(directory, name); return file.lastModified(); @@ -186,20 +186,20 @@ } /** Returns the length in bytes of a file in the directory. */ - public final long fileLength(String name) throws IOException { + public long fileLength(String name) throws IOException { File file = new File(directory, name); return file.length(); } /** Removes an existing file in the directory. */ - public final void deleteFile(String name) throws IOException { + public void deleteFile(String name) throws IOException { File file = new File(directory, name); if (!file.delete()) throw new IOException("Cannot delete " + name); } /** Renames an existing file in the directory. */ - public final synchronized void renameFile(String from, String to) + public synchronized void renameFile(String from, String to) throws IOException { File old = new File(directory, from); File nu = new File(directory, to); @@ -259,12 +259,12 @@ /** Creates a new, empty file in the directory with the given name. Returns a stream writing this file. */ - public final OutputStream createFile(String name) throws IOException { + public OutputStream createFile(String name) throws IOException { return new FSOutputStream(new File(directory, name)); } /** Returns a stream reading an existing file. */ - public final InputStream openFile(String name) throws IOException { + public InputStream openFile(String name) throws IOException { return new FSInputStream(new File(directory, name)); } @@ -285,13 +285,13 @@ * @param name the name of the lock file * @return an instance of <code>Lock</code> holding the lock */ - public final Lock makeLock(String name) { + public Lock makeLock(String name) { StringBuffer buf = getLockPrefix(); buf.append("-"); buf.append(name); // create a lock file - final File lockFile = new File(lockDir, buf.toString()); + File lockFile = new File(lockDir, buf.toString()); return new Lock() { public boolean obtain() throws IOException { @@ -347,7 +347,7 @@ } /** Closes the store to future operations. */ - public final synchronized void close() throws IOException { + public synchronized void close() throws IOException { if (--refCount <= 0) { synchronized (DIRECTORIES) { DIRECTORIES.remove(directory); @@ -366,7 +366,7 @@ } -final class FSInputStream extends InputStream { +class FSInputStream extends InputStream { private class Descriptor extends RandomAccessFile { /* DEBUG */ //private String name; @@ -407,7 +407,7 @@ } /** InputStream methods */ - protected final void readInternal(byte[] b, int offset, int len) + protected void readInternal(byte[] b, int offset, int len) throws IOException { synchronized (file) { long position = getFilePointer(); @@ -426,16 +426,16 @@ } } - public final void close() throws IOException { + public void close() throws IOException { if (!isClone) file.close(); } /** Random-access methods */ - protected final void seekInternal(long position) throws IOException { + protected void seekInternal(long position) throws IOException { } - protected final void finalize() throws IOException { + protected void finalize() throws IOException { close(); // close the file } @@ -454,7 +454,7 @@ } -final class FSOutputStream extends OutputStream { +class FSOutputStream extends OutputStream { RandomAccessFile file = null; public FSOutputStream(File path) throws IOException { @@ -462,24 +462,24 @@ } /** output methods: */ - public final void flushBuffer(byte[] b, int size) throws IOException { + public void flushBuffer(byte[] b, int size) throws IOException { file.write(b, 0, size); } - public final void close() throws IOException { + public void close() throws IOException { super.close(); file.close(); } /** Random-access methods */ - public final void seek(long pos) throws IOException { + public void seek(long pos) throws IOException { super.seek(pos); file.seek(pos); } - public final long length() throws IOException { + public long length() throws IOException { return file.length(); } - protected final void finalize() throws IOException { + protected void finalize() throws IOException { file.close(); // close the file }
Diff finished. Thu Sep 02 15:20:53 2004
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]