Improve BLocalTerminalDriver

Add setCodec() and codec() methods to BLocalTerminalDriver.