Code example for PrintStream

Methods: println

0
    public static void main(String[] args) {
        (new Media()).run(args);
    } 
 
    public void onShowUsage(PrintStream out) {
        out.println(
                "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(
                Context.AUDIO_SERVICE));
        if (mAudioService == null) {