Implements Input/OutputStream helpers