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

Would you change the return type to IS ?