Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in WriteBufferDataHandle: cannot seek to file end #478

Open
Daniel-Alievsky opened this issue Jun 7, 2024 · 0 comments
Open

Bug in WriteBufferDataHandle: cannot seek to file end #478

Daniel-Alievsky opened this issue Jun 7, 2024 · 0 comments

Comments

@Daniel-Alievsky
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant