added outputStream.writeN, outputStream.writeUpToN,inputStream.readN, inputStream.readUpToN