blob: d84342759456fb36bb7a49f42b2d59951da459ec [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_161-google-v7) on Thu Oct 18 16:14:35 PDT 2018 -->
<title>CompressedSource (Apache Beam 2.8.0-SNAPSHOT)</title>
<meta name="date" content="2018-10-18">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CompressedSource (Apache Beam 2.8.0-SNAPSHOT)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":9,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.CompressedReader.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/io/CompressedSource.html" target="_top">Frames</a></li>
<li><a href="CompressedSource.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.beam.sdk.io</div>
<h2 title="Class CompressedSource" class="title">Class CompressedSource&lt;T&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.Source</a>&lt;T&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.BoundedSource</a>&lt;T&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.OffsetBasedSource</a>&lt;T&gt;</li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">org.apache.beam.sdk.io.FileBasedSource</a>&lt;T&gt;</li>
<li>
<ul class="inheritance">
<li>org.apache.beam.sdk.io.CompressedSource&lt;T&gt;</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The type to read from the compressed file.</dd>
</dl>
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, <a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display">HasDisplayData</a></dd>
</dl>
<hr>
<br>
<pre><a href="../../../../../org/apache/beam/sdk/annotations/Experimental.html" title="annotation in org.apache.beam.sdk.annotations">@Experimental</a>(<a href="../../../../../org/apache/beam/sdk/annotations/Experimental.html#value--">value</a>=<a href="../../../../../org/apache/beam/sdk/annotations/Experimental.Kind.html#SOURCE_SINK">SOURCE_SINK</a>)
public class <span class="typeNameLabel">CompressedSource&lt;T&gt;</span>
extends <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;T&gt;</pre>
<div class="block">A Source that reads from compressed files. A <code>CompressedSources</code> wraps a delegate <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io"><code>FileBasedSource</code></a> that is able to read the decompressed file format.
<p>For example, use the following to read from a gzip-compressed file-based source:
<pre><code>
FileBasedSource&lt;T&gt; mySource = ...;
PCollection&lt;T&gt; collection = p.apply(Read.from(CompressedSource
.from(mySource)
.withCompression(Compression.GZIP)));
</code></pre>
<p>Supported compression algorithms are <a href="../../../../../org/apache/beam/sdk/io/Compression.html#GZIP"><code>Compression.GZIP</code></a>, <a href="../../../../../org/apache/beam/sdk/io/Compression.html#BZIP2"><code>Compression.BZIP2</code></a>,
<a href="../../../../../org/apache/beam/sdk/io/Compression.html#ZIP"><code>Compression.ZIP</code></a> and <a href="../../../../../org/apache/beam/sdk/io/Compression.html#DEFLATE"><code>Compression.DEFLATE</code></a>. User-defined compression types are
supported by implementing a <a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io"><code>CompressedSource.DecompressingChannelFactory</code></a>.
<p>By default, the compression algorithm is selected from those supported in <a href="../../../../../org/apache/beam/sdk/io/Compression.html" title="enum in org.apache.beam.sdk.io"><code>Compression</code></a>
based on the file name provided to the source, namely <code>".bz2"</code> indicates <a href="../../../../../org/apache/beam/sdk/io/Compression.html#BZIP2"><code>Compression.BZIP2</code></a>, <code>".gz"</code> indicates <a href="../../../../../org/apache/beam/sdk/io/Compression.html#GZIP"><code>Compression.GZIP</code></a>, <code>".zip"</code> indicates
<a href="../../../../../org/apache/beam/sdk/io/Compression.html#ZIP"><code>Compression.ZIP</code></a> and <code>".deflate"</code> indicates <a href="../../../../../org/apache/beam/sdk/io/Compression.html#DEFLATE"><code>Compression.DEFLATE</code></a>. If the file
name does not match any of the supported algorithms, it is assumed to be uncompressed data.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../serialized-form.html#org.apache.beam.sdk.io.CompressedSource">Serialized Form</a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="nested.class.summary">
<!-- -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.CompressedReader.html" title="class in org.apache.beam.sdk.io">CompressedSource.CompressedReader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.CompressedReader.html" title="type parameter in CompressedSource.CompressedReader">T</a>&gt;</span></code>
<div class="block">Reader for a <a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io"><code>CompressedSource</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.CompressionMode.html" title="enum in org.apache.beam.sdk.io">CompressedSource.CompressionMode</a></span></code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">Use <a href="../../../../../org/apache/beam/sdk/io/Compression.html" title="enum in org.apache.beam.sdk.io"><code>Compression</code></a> instead</span></div>
</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io">CompressedSource.DecompressingChannelFactory</a></span></code>
<div class="block">Factory interface for creating channels that decompress the content of an underlying channel.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.io.FileBasedSource">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io">FileBasedSource.FileBasedReader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="type parameter in FileBasedSource.FileBasedReader">T</a>&gt;, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.Mode.html" title="enum in org.apache.beam.sdk.io">FileBasedSource.Mode</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.io.OffsetBasedSource">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.OffsetBasedReader.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource.OffsetBasedReader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.OffsetBasedReader.html" title="type parameter in OffsetBasedSource.OffsetBasedReader">T</a>&gt;</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.io.BoundedSource">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/BoundedSource.html" title="class in org.apache.beam.sdk.io">BoundedSource</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io">BoundedSource.BoundedReader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="type parameter in BoundedSource.BoundedReader">T</a>&gt;</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="nested.classes.inherited.from.class.org.apache.beam.sdk.io.Source">
<!-- -->
</a>
<h3>Nested classes/interfaces inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io">Source</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="class in org.apache.beam.sdk.io">Source.Reader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/Source.Reader.html" title="type parameter in Source.Reader">T</a>&gt;</code></li>
</ul>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#createForSubrangeOfFile-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-">createForSubrangeOfFile</a></span>(<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a>&nbsp;metadata,
long&nbsp;start,
long&nbsp;end)</code>
<div class="block">Creates a <code>CompressedSource</code> for a subrange of a file.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io">FileBasedSource.FileBasedReader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#createSingleFileReader-org.apache.beam.sdk.options.PipelineOptions-">createSingleFileReader</a></span>(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a>&nbsp;options)</code>
<div class="block">Creates a <code>FileBasedReader</code> to read a single file.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io">CompressedSource</a>&lt;T&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#from-org.apache.beam.sdk.io.FileBasedSource-">from</a></span>(<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;T&gt;&nbsp;sourceDelegate)</code>
<div class="block">Creates a <code>CompressedSource</code> from an underlying <code>FileBasedSource</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io">CompressedSource.DecompressingChannelFactory</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#getChannelFactory--">getChannelFactory</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#getOutputCoder--">getOutputCoder</a></span>()</code>
<div class="block">Returns the delegate source's output coder.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#isSplittable--">isSplittable</a></span>()</code>
<div class="block">Determines whether a single file represented by this source is splittable.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></span>(<a href="../../../../../org/apache/beam/sdk/transforms/display/DisplayData.Builder.html" title="interface in org.apache.beam.sdk.transforms.display">DisplayData.Builder</a>&nbsp;builder)</code>
<div class="block">Register display data for the given transform or component.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#validate--">validate</a></span>()</code>
<div class="block">Validates that the delegate source is a valid source and that the channel factory is not null.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io">CompressedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#withCompression-org.apache.beam.sdk.io.Compression-">withCompression</a></span>(<a href="../../../../../org/apache/beam/sdk/io/Compression.html" title="enum in org.apache.beam.sdk.io">Compression</a>&nbsp;compression)</code>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#withDecompression-org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory-"><code>withDecompression(org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory)</code></a> but takes a canonical <a href="../../../../../org/apache/beam/sdk/io/Compression.html" title="enum in org.apache.beam.sdk.io"><code>Compression</code></a>.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io">CompressedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#withDecompression-org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory-">withDecompression</a></span>(<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io">CompressedSource.DecompressingChannelFactory</a>&nbsp;channelFactory)</code>
<div class="block">Return a <code>CompressedSource</code> that is like this one but will decompress its underlying file
with the given <a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io"><code>CompressedSource.DecompressingChannelFactory</code></a>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.io.FileBasedSource">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createReader-org.apache.beam.sdk.options.PipelineOptions-">createReader</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createSourceForSubrange-long-long-">createSourceForSubrange</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getEmptyMatchTreatment--">getEmptyMatchTreatment</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getEstimatedSizeBytes-org.apache.beam.sdk.options.PipelineOptions-">getEstimatedSizeBytes</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getFileOrPatternSpec--">getFileOrPatternSpec</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getFileOrPatternSpecProvider--">getFileOrPatternSpecProvider</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getMaxEndOffset-org.apache.beam.sdk.options.PipelineOptions-">getMaxEndOffset</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getMode--">getMode</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getSingleFileMetadata--">getSingleFileMetadata</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#split-long-org.apache.beam.sdk.options.PipelineOptions-">split</a>, <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#toString--">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.io.OffsetBasedSource">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html" title="class in org.apache.beam.sdk.io">OffsetBasedSource</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getBytesPerOffset--">getBytesPerOffset</a>, <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getEndOffset--">getEndOffset</a>, <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getMinBundleSize--">getMinBundleSize</a>, <a href="../../../../../org/apache/beam/sdk/io/OffsetBasedSource.html#getStartOffset--">getStartOffset</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.beam.sdk.io.Source">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.beam.sdk.io.<a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io">Source</a></h3>
<code><a href="../../../../../org/apache/beam/sdk/io/Source.html#getDefaultOutputCoder--">getDefaultOutputCoder</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="from-org.apache.beam.sdk.io.FileBasedSource-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>from</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io">CompressedSource</a>&lt;T&gt;&nbsp;from(<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;T&gt;&nbsp;sourceDelegate)</pre>
<div class="block">Creates a <code>CompressedSource</code> from an underlying <code>FileBasedSource</code>. The type of
compression used will be based on the file name extension unless explicitly configured via
<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#withDecompression-org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory-"><code>withDecompression(org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory)</code></a>.</div>
</li>
</ul>
<a name="withDecompression-org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withDecompression</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io">CompressedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;&nbsp;withDecompression(<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io">CompressedSource.DecompressingChannelFactory</a>&nbsp;channelFactory)</pre>
<div class="block">Return a <code>CompressedSource</code> that is like this one but will decompress its underlying file
with the given <a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io"><code>CompressedSource.DecompressingChannelFactory</code></a>.</div>
</li>
</ul>
<a name="withCompression-org.apache.beam.sdk.io.Compression-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>withCompression</h4>
<pre>public&nbsp;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="class in org.apache.beam.sdk.io">CompressedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;&nbsp;withCompression(<a href="../../../../../org/apache/beam/sdk/io/Compression.html" title="enum in org.apache.beam.sdk.io">Compression</a>&nbsp;compression)</pre>
<div class="block">Like <a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html#withDecompression-org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory-"><code>withDecompression(org.apache.beam.sdk.io.CompressedSource.DecompressingChannelFactory)</code></a> but takes a canonical <a href="../../../../../org/apache/beam/sdk/io/Compression.html" title="enum in org.apache.beam.sdk.io"><code>Compression</code></a>.</div>
</li>
</ul>
<a name="validate--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>validate</h4>
<pre>public&nbsp;void&nbsp;validate()</pre>
<div class="block">Validates that the delegate source is a valid source and that the channel factory is not null.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#validate--">validate</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="createForSubrangeOfFile-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createForSubrangeOfFile</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;&nbsp;createForSubrangeOfFile(<a href="../../../../../org/apache/beam/sdk/io/fs/MatchResult.Metadata.html" title="class in org.apache.beam.sdk.io.fs">MatchResult.Metadata</a>&nbsp;metadata,
long&nbsp;start,
long&nbsp;end)</pre>
<div class="block">Creates a <code>CompressedSource</code> for a subrange of a file. Called by superclass to create a
source for a single file.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createForSubrangeOfFile-org.apache.beam.sdk.io.fs.MatchResult.Metadata-long-long-">createForSubrangeOfFile</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>metadata</code> - file backing the new <code>FileBasedSource</code>.</dd>
<dd><code>start</code> - starting byte offset of the new <code>FileBasedSource</code>.</dd>
<dd><code>end</code> - ending byte offset of the new <code>FileBasedSource</code>. May be Long.MAX_VALUE, in
which case it will be inferred using <a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#getMaxEndOffset-org.apache.beam.sdk.options.PipelineOptions-"><code>FileBasedSource.getMaxEndOffset(org.apache.beam.sdk.options.PipelineOptions)</code></a>.</dd>
</dl>
</li>
</ul>
<a name="isSplittable--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isSplittable</h4>
<pre>protected final&nbsp;boolean&nbsp;isSplittable()</pre>
<div class="block">Determines whether a single file represented by this source is splittable. Returns true if we
are using the default decompression factory and and it determines from the requested file name
that the file is not compressed.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#isSplittable--">isSplittable</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="createSingleFileReader-org.apache.beam.sdk.options.PipelineOptions-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createSingleFileReader</h4>
<pre>protected final&nbsp;<a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.FileBasedReader.html" title="class in org.apache.beam.sdk.io">FileBasedSource.FileBasedReader</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;&nbsp;createSingleFileReader(<a href="../../../../../org/apache/beam/sdk/options/PipelineOptions.html" title="interface in org.apache.beam.sdk.options">PipelineOptions</a>&nbsp;options)</pre>
<div class="block">Creates a <code>FileBasedReader</code> to read a single file.
<p>Uses the delegate source to create a single file reader for the delegate source. Utilizes
the default decompression channel factory to not wrap the source reader if the file name does
not represent a compressed file allowing for splitting of the source.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#createSingleFileReader-org.apache.beam.sdk.options.PipelineOptions-">createSingleFileReader</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>populateDisplayData</h4>
<pre>public&nbsp;void&nbsp;populateDisplayData(<a href="../../../../../org/apache/beam/sdk/transforms/display/DisplayData.Builder.html" title="interface in org.apache.beam.sdk.transforms.display">DisplayData.Builder</a>&nbsp;builder)</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/Source.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">Source</a></code></span></div>
<div class="block">Register display data for the given transform or component.
<p><code>populateDisplayData(DisplayData.Builder)</code> is invoked by Pipeline runners to collect
display data via <a href="../../../../../org/apache/beam/sdk/transforms/display/DisplayData.html#from-org.apache.beam.sdk.transforms.display.HasDisplayData-"><code>DisplayData.from(HasDisplayData)</code></a>. Implementations may call <code>super.populateDisplayData(builder)</code> in order to register display data in the current namespace,
but should otherwise use <code>subcomponent.populateDisplayData(builder)</code> to use the namespace
of the subcomponent.
<p>By default, does not register any display data. Implementors may override this method to
provide their own display data.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display">HasDisplayData</a></code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html#populateDisplayData-org.apache.beam.sdk.transforms.display.DisplayData.Builder-">populateDisplayData</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/FileBasedSource.html" title="class in org.apache.beam.sdk.io">FileBasedSource</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>builder</code> - The builder to populate with display data.</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/beam/sdk/transforms/display/HasDisplayData.html" title="interface in org.apache.beam.sdk.transforms.display"><code>HasDisplayData</code></a></dd>
</dl>
</li>
</ul>
<a name="getOutputCoder--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getOutputCoder</h4>
<pre>public final&nbsp;<a href="../../../../../org/apache/beam/sdk/coders/Coder.html" title="class in org.apache.beam.sdk.coders">Coder</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;&nbsp;getOutputCoder()</pre>
<div class="block">Returns the delegate source's output coder.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/beam/sdk/io/Source.html#getOutputCoder--">getOutputCoder</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/beam/sdk/io/Source.html" title="class in org.apache.beam.sdk.io">Source</a>&lt;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.html" title="type parameter in CompressedSource">T</a>&gt;</code></dd>
</dl>
</li>
</ul>
<a name="getChannelFactory--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getChannelFactory</h4>
<pre>public final&nbsp;<a href="../../../../../org/apache/beam/sdk/io/CompressedSource.DecompressingChannelFactory.html" title="interface in org.apache.beam.sdk.io">CompressedSource.DecompressingChannelFactory</a>&nbsp;getChannelFactory()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/beam/sdk/io/BoundedSource.BoundedReader.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/apache/beam/sdk/io/CompressedSource.CompressedReader.html" title="class in org.apache.beam.sdk.io"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/beam/sdk/io/CompressedSource.html" target="_top">Frames</a></li>
<li><a href="CompressedSource.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>