Code example for PrintStream

Methods: println

    public static void main(String[] args) {
        (new Media()).run(args);
    public void onShowUsage(PrintStream out) {
                "usage: media [subcommand] [options]\n" + 
                "       media dispatch KEY\n" + 
                "       media remote-display\n" + 
                "\n" + 
                "media dispatch: dispatch a media key to the current media client.\n" + 
                "                KEY may be: play, pause, play-pause, mute, headsethook,\n" + 
                "                stop, next, previous, rewind, recordm fast-forword.\n" + 
                "media remote-display: monitor remote display updates.\n" 
    public void onRun() throws Exception { 
        mAudioService = IAudioService.Stub.asInterface(ServiceManager.checkService(
Contextual code suggestions in your IDE  Get Codota for Java