Created
March 23, 2019 18:11
-
-
Save fragamus/68405a42ca7f85d887573edf3dcfc5f0 to your computer and use it in GitHub Desktop.
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
public static String pingPongBallToStringThatIsBothMachineReadableAndHumanReadable(PingPongBall a){ | |
Function<PingPongBall,byte[]> funky = x -> x.toByteArray(); | |
return funky | |
.andThen(x->Base64.getEncoder().encode(x)) | |
.andThen(x->x+"\n"+a) | |
.apply(a); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment