Fix the docs for ReadHandle.read's "count"

This was copied over from the old binary handle, and so states we
always return a single number if no count is given. This is only the
case when the file is opened in binary mode.
This commit is contained in:
Jonathan Coates 2024-01-23 22:39:49 +00:00
parent 359c8d6652
commit 9ccee75a99
No known key found for this signature in database
GPG Key ID: B9E431FF07C98D06
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ public String getName() {
}
private record Output(CachedOutput output) implements CachedOutput {
@SuppressWarnings("unused")
@SuppressWarnings("deprecation")
private static final HashFunction HASH_FUNCTION = Hashing.sha1();
@Override

View File

@ -100,8 +100,8 @@ public Object[] seek(Optional<String> whence, Optional<Long> offset) throws LuaE
/**
* Read a number of bytes from this file.
*
* @param countArg The number of bytes to read. When absent, a single byte will be read <em>as a number</em>. This
* may be 0 to determine we are at the end of the file.
* @param countArg The number of bytes to read. This may be 0 to determine we are at the end of the file. When
* absent, a single byte will be read.
* @return The read bytes.
* @throws LuaException When trying to read a negative number of bytes.
* @throws LuaException If the file has been closed.