Code example for DataOutputStream

Methods: flushwriteBytes

0
        } 
         
        try { 
            Log.i(TAG,"Calling reboot");
            Process su = FileCopier.getSu(); 
            DataOutputStream stream = new DataOutputStream(su.getOutputStream());
            stream.writeBytes("reboot\nexit\n");
            stream.flush();
            su.waitFor(); 
        } catch (IOException e) {
            // get rid of our dialog first and then throw the exception back 
            dismissDialog(DIALOG_PROGRESS);
            throw e;
        } catch (InterruptedException e) {
            // get rid of our dialog first and then throw the exception back 
            dismissDialog(DIALOG_PROGRESS);
            throw e;
        } 
         
        if (progressDialog.isShowing()) {
Connect your IDE to all the code out there  Get Codota for Java