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

Same as above, would you change the return type to OS ?