You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2024/10/06 20:03:23 UTC
(commons-imaging) branch master updated: Better parameter names
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git
The following commit(s) were added to refs/heads/master by this push:
new 9ce1dc43 Better parameter names
9ce1dc43 is described below
commit 9ce1dc437eebcf7b06f4d320ed593a5be650bf2b
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Oct 6 16:03:19 2024 -0400
Better parameter names
---
.../java/org/apache/commons/imaging/bytesource/ByteSource.java | 4 ++--
.../java/org/apache/commons/imaging/common/BinaryFunctions.java | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java b/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java
index df85cbdc..eba39497 100644
--- a/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java
+++ b/src/main/java/org/apache/commons/imaging/bytesource/ByteSource.java
@@ -71,12 +71,12 @@ public class ByteSource {
return origin.getInputStream();
}
- public final InputStream getInputStream(final long start) throws IOException {
+ public final InputStream getInputStream(final long skip) throws IOException {
InputStream is = null;
boolean succeeded = false;
try {
is = getInputStream();
- BinaryFunctions.skipBytes(is, start);
+ BinaryFunctions.skipBytes(is, skip);
succeeded = true;
} finally {
if (!succeeded) {
diff --git a/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java b/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java
index 432df236..c1bb79a9 100644
--- a/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java
+++ b/src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java
@@ -289,13 +289,13 @@ public final class BinaryFunctions {
return false;
}
- public static long skipBytes(final InputStream is, final long length) throws IOException {
- return skipBytes(is, length, "Couldn't skip bytes");
+ public static long skipBytes(final InputStream is, final long skip) throws IOException {
+ return skipBytes(is, skip, "Couldn't skip bytes");
}
- public static long skipBytes(final InputStream is, final long length, final String exMessage) throws IOException {
+ public static long skipBytes(final InputStream is, final long skip, final String exMessage) throws IOException {
try {
- return IOUtils.skip(is, length);
+ return IOUtils.skip(is, skip);
} catch (final IOException e) {
throw new IOException(exMessage, e);
}