Skip to content

Bug in WriteBufferDataHandle: cannot seek to file end #478

Open
@Daniel-Alievsky

Description

@Daniel-Alievsky

I tried to use WriteBufferDataHandle for optimizing writing TIFF, but it cannot be used: the simplest call out.seek(out.length()) (for writing to the end of the existing file) does not work. Just see your code:

	public void seek(final long pos) throws IOException {
		ensureOpen();
		if (pos >= length()) { //!!!!!
			throw new EOFException();
		}
		flush();
		offset = pos;
		handle().seek(offset);
	}

By the way, can we be sure that this class will work right while random access usage, togethter with any calls of seek method?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions