-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
recover jpeg header in stratosattk1 image decoder
- Loading branch information
1 parent
894d3a3
commit a960250
Showing
2 changed files
with
107 additions
and
11 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/main/java/ru/r2cloud/jradio/sstk1/StratosatTk1BeaconComparator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package ru.r2cloud.jradio.sstk1; | ||
|
||
import java.util.Comparator; | ||
|
||
public class StratosatTk1BeaconComparator implements Comparator<StratosatTk1Beacon> { | ||
|
||
public static final StratosatTk1BeaconComparator INSTANCE = new StratosatTk1BeaconComparator(); | ||
|
||
@Override | ||
public int compare(StratosatTk1Beacon o1, StratosatTk1Beacon o2) { | ||
if (o1.getFileData() == null || o2.getFileData() == null) { | ||
// doesn't matter because we're interested only in the beacons with file data | ||
return Long.compare(o1.getBeginSample(), o2.getBeginSample()); | ||
} | ||
return Integer.compare(o1.getTk1Header().getPacketOffset(), o2.getTk1Header().getPacketOffset()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters