RedBox Implementation in Java