public static InputStream open()

in src/main/java/com/microsoft/azure/datalake/store/Core.java [254:290]


    public static InputStream open(String path,
                                   long offset,
                                   long length,
                                   String sessionId,
                                   boolean speculativeRead,
                                   ADLStoreClient client,
                                   RequestOptions opts,
                                   OperationResponse resp) {
        QueryParams qp = new QueryParams();
        qp.add("read", "true");
        if (offset < 0) {
            resp.successful = false;
            resp.message = "attempt to read from negative offset: " + offset;
            return null;
        }

        if (length < 0) {
            resp.successful = false;
            resp.message = "attempt to read negative length: " + length;
            return null;
        }

        if (offset > 0) qp.add("offset", Long.toString(offset));
        if (length > 0) qp.add("length", Long.toString(length));
        if (speculativeRead) qp.add("speculative", "true");
        if (sessionId != null && !sessionId.equals("")) {
            qp.add("filesessionid", sessionId);
        }

        HttpTransport.makeCall(client, Operation.OPEN, path, qp, null, 0, 0, opts, resp);

        if (resp.successful) {
            return resp.responseStream;
        } else {
            return null;
        }
    }