Code example for CharBuffer

Methods: clear

0
 
	public NCSerialConnection() { 
		// TODO Auto-generated constructor stub 
		running = false;
		printBuffer = CharBuffer.allocate(1024);
		printBuffer.clear();
	} 
 
	public void startSerialCom() throws IOException { 
		if (running) {
			return; 
		} 
		Log.d(TAG, "startSerialCom");
 
		/* Start serial_com process for device /dev/ttyUSB0. */ 
		serialComProc = Runtime.getRuntime().exec("su");
 
		out = serialComProc.getOutputStream();
		DataOutputStream outs = new DataOutputStream(out);
		// outs.writeBytes("enable-usb-device" + "\n"); 
Connect your IDE to all the code out there  Get Codota for Java