import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.io.RandomAccessFile;
+import java.nio.channels.ByteChannel;
+import java.nio.channels.FileChannel;
+import java.nio.channels.ReadableByteChannel;
import org.apache.commons.logging.LogFactory;
return new BufferedInputStream(fis);
return null;
}
+ /**
+ * safe lock target length() function.
+ * @return -1 for non-lockable target, otherwise target's file length
+ */
+ public abstract long length();
+ public abstract RandomAccessFile getRaFile() throws IOException;
+ public abstract FileChannel getRaChannel() throws IOException;
}