From e5489332cc3afa4b279475f6c9580047f9533f32 Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Tue, 30 May 2023 12:51:34 +0530 Subject: [PATCH] Make `flush` and `encode` public --- .../java/com/aayushatharva/brotli4j/encoder/Encoder.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/brotli4j/src/main/java/com/aayushatharva/brotli4j/encoder/Encoder.java b/brotli4j/src/main/java/com/aayushatharva/brotli4j/encoder/Encoder.java index 568ab3f0..b432f5e0 100644 --- a/brotli4j/src/main/java/com/aayushatharva/brotli4j/encoder/Encoder.java +++ b/brotli4j/src/main/java/com/aayushatharva/brotli4j/encoder/Encoder.java @@ -170,8 +170,9 @@ boolean pushOutput(boolean force) throws IOException { /** * @return true if there is space in inputBuffer. */ + @Local @Upstream - boolean encode(EncoderJNI.Operation op) throws IOException { + public boolean encode(EncoderJNI.Operation op) throws IOException { boolean force = (op != EncoderJNI.Operation.PROCESS); if (force) { ((Buffer) inputBuffer).limit(inputBuffer.position()); @@ -198,8 +199,9 @@ boolean encode(EncoderJNI.Operation op) throws IOException { } } + @Local @Upstream - void flush() throws IOException { + public void flush() throws IOException { encode(EncoderJNI.Operation.FLUSH); }