Skip to content

Commit

Permalink
Don't require ByteArrayInputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
bertrik committed Dec 19, 2024
1 parent 291e34f commit e187926
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
Expand Down Expand Up @@ -114,7 +115,7 @@ private void downloadShapeFile() {
schedule(this::downloadShapeFile, Duration.ofDays(1));
}

private void decode(ByteArrayInputStream inputStream) throws IOException {
private void decode(InputStream inputStream) throws IOException {
try (GZIPInputStream gzis = new GZIPInputStream(inputStream)) {
MeasuredDataPublication publication = MeasuredDataPublication.parse(gzis);
LOG.info("Got data for time {}", publication.getPublicationTime());
Expand Down

0 comments on commit e187926

Please sign in to comment.