Access Segment Of Input

Examples for reading sections of an Input object without reading all data in the underlying resource

Skipping Bytes

How to skip the first X bytes.
    import scalax.io._

    val in:Input = Resource.fromURLString("file://someFile")

    // Skip the first 10 bytes.  If underlying resource supports it the
    // bytes will not be read
    // Remember resource is lazy as of assignment resource has not yet been opened
    val restOfBytes = in.bytes.drop(10)

    // After assignment of ''string'' the resource has been opened and processed
    val string = new String(restOfBytes.toArray)