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

Same as above, this line can go.