Initial replay parsing support.
- Basic implementation of viewing replays in the Game state. - Added OsuReader class for reading certain osu! file types. (author: Markus Jarderot) - Added Replay, ReplayFrame, and LifeFrame classes to capture replay data. (author: smoogipooo) - Added 'keyPressed' parameter to HitObject.update(). - Added cursor-drawing methods in UI that take the mouse coordinates and pressed state as parameters. - Added GameMod methods to retrieve/load the active mods state as a bitmask. - Added Apache commons-compress dependency for handling LZMA decompression. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -41,6 +41,7 @@ import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
@@ -546,4 +547,15 @@ public class Utils {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts an input stream to a string.
|
||||
* @param is the input stream
|
||||
* @author Pavel Repin, earcam (http://stackoverflow.com/a/5445161)
|
||||
*/
|
||||
public static String convertStreamToString(InputStream is) {
|
||||
try (Scanner s = new Scanner(is)) {
|
||||
return s.useDelimiter("\\A").hasNext() ? s.next() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user