> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# downloadFiles

<div className="kinetica-javadoc">
  <ul className="member-list">
    <li>
      <div className="section detail" id="downloadFiles(com.gpudb.protocol.DownloadFilesRequest)">
        <h3>downloadFiles</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/DownloadFilesResponse" title="class in com.gpudb.protocol">DownloadFilesResponse</a></span> <span className="element-name">downloadFiles</span><wbr /><span className="parameters">(<a href="/content/api/java/com/gpudb/protocol/DownloadFilesRequest" title="class in com.gpudb.protocol">DownloadFilesRequest</a> request)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Downloads one or more files from <a href="/content/tools/kifs/" target="_top">KiFS</a>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>request</code> - <a href="/content/api/java/com/gpudb/protocol/DownloadFilesRequest" title="class in com.gpudb.protocol"><code>Request</code></a> object containing the parameters for the operation.</div>
          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/DownloadFilesResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>

    <li>
      <div className="section detail" id="downloadFiles(java.util.List,java.util.List,java.util.List,java.util.Map)">
        <h3>downloadFiles</h3>
        <div className="member-signature"><span className="modifiers">public</span> <span className="return-type"><a href="/content/api/java/com/gpudb/protocol/DownloadFilesResponse" title="class in com.gpudb.protocol">DownloadFilesResponse</a></span> <span className="element-name">downloadFiles</span><wbr /><span className="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> fileNames, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" className="external-link">Long</a>> readOffsets, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" className="external-link">List</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Long.html" title="class or interface in java.lang" className="external-link">Long</a>> readLengths, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link">Map</a>\<<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>,<wbr /><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" className="external-link">String</a>> options)</span> throws <span className="exceptions"><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></span></div>
        <div className="block">Downloads one or more files from <a href="/content/tools/kifs/" target="_top">KiFS</a>.</div>

        <div className="dl notes">
          <div className="dt">Parameters:</div>
          <div className="dd"><code>fileNames</code> - An array of the file names to download from KiFS. File paths may contain wildcard characters after the KiFS directory delimiter. Accepted wildcard characters are asterisk (\*) to represent any string of zero or more characters, and question mark (?) to indicate a single character.</div>
          <div className="dd"><code>readOffsets</code> - An array of starting byte offsets from which to read each respective file in <code>fileNames</code>. Must either be empty or the same length as <code> fileNames</code>. If empty, files are downloaded in their entirety. If not empty, <code>readLengths</code> must also not be empty.</div>
          <div className="dd"><code>readLengths</code> - Array of number of bytes to read from each respective file in <code>fileNames</code>. Must either be empty or the same length as <code>fileNames</code>. If empty, files are downloaded in their entirety. If not empty, <code>readOffsets</code> must also not be empty.</div>

          <div className="dd">
            <code>options</code> - Optional parameters.

            <ul>
              <li>
                <a href="/content/api/java/com/gpudb/protocol/DownloadFilesRequest.Options#FILE_ENCODING"><code>FILE\_ENCODING</code></a>: Encoding to be applied to the output file data. When using JSON serialization it is recommended to specify this as <a href="/content/api/java/com/gpudb/protocol/DownloadFilesRequest.Options#BASE64"><code>BASE64</code></a>. Supported values:

                <ul>
                  <li><a href="/content/api/java/com/gpudb/protocol/DownloadFilesRequest.Options#BASE64"><code>BASE64</code></a>: Apply base64 encoding to the output file data. </li>
                  <li><a href="/content/api/java/com/gpudb/protocol/DownloadFilesRequest.Options#NONE"><code>NONE</code></a>: Do not apply any encoding to the output file data. </li>
                </ul>

                The default value is <a href="/content/api/java/com/gpudb/protocol/DownloadFilesRequest.Options#NONE"><code>NONE</code></a>.
              </li>
            </ul>

            The default value is an empty <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" className="external-link"><code>Map</code></a>.
          </div>

          <div className="dt">Returns:</div>
          <div className="dd"><a href="/content/api/java/com/gpudb/protocol/DownloadFilesResponse" title="class in com.gpudb.protocol"><code>Response</code></a> object containing the results of the operation.</div>
          <div className="dt">Throws:</div>
          <div className="dd"><code><a href="/content/api/java/com/gpudb/GPUdbException" title="class in com.gpudb">GPUdbException</a></code> - if an error occurs during the operation.</div>
        </div>
      </div>
    </li>
  </ul>
</div>
