IO layer: add Java API and docs for TCP