mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-04-30 00:00:01 -04:00
#182 Massive refactorings to clean up metadata and segment handling
This commit is contained in:
+5
-1
@@ -53,11 +53,15 @@ public final class JPEGSegment implements Serializable {
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
int segmentLength() {
|
||||
public int segmentLength() {
|
||||
// This is the length field as read from the stream
|
||||
return length;
|
||||
}
|
||||
|
||||
public InputStream segmentData() {
|
||||
return data != null ? new ByteArrayInputStream(data) : null;
|
||||
}
|
||||
|
||||
public int marker() {
|
||||
return marker;
|
||||
}
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ public final class JPEGSegmentUtil {
|
||||
|
||||
if (isRequested(segment, segmentIdentifiers)) {
|
||||
if (segments == Collections.EMPTY_LIST) {
|
||||
segments = new ArrayList<JPEGSegment>();
|
||||
segments = new ArrayList<>();
|
||||
}
|
||||
|
||||
segments.add(segment);
|
||||
|
||||
Reference in New Issue
Block a user