public static LinkedFile SetupFromExistingStream( java.io.RandomAccessFile fromfile, long StartSeek) throws Exception { LinkedFile result = new LinkedFile(100, StartSeek); // dummy buffer size for now result.fromfile = fromfile; result.readHeader(); result.buffers = BufferFile.SetupFromExistingStream(fromfile, StartSeek + result.headersize); return result; }
public static LinkedFile InitializeLinkedFileInStream( java.io.RandomAccessFile fromfile, int buffersize, long StartSeek) throws Exception { LinkedFile result = new LinkedFile(buffersize, StartSeek); result.fromfile = fromfile; result.setHeader(); // buffersize should be increased by overhead... result.buffers = BufferFile.InitializeBufferFileInStream( fromfile, buffersize + BUFFEROVERHEAD, StartSeek + result.headersize); return result; }