ByteArray{Input,Output}Stream are synchronized, do not use them here