blob: a28f21dea3b92649545845ae98ce5af465e4284b [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>RandomAccessBuffer (PDFBox reactor 2.0.3 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="RandomAccessBuffer (PDFBox reactor 2.0.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="class-use/RandomAccessBuffer.html">Use</a></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/pdfbox/io/RandomAccess.html" title="interface in org.apache.pdfbox.io"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/pdfbox/io/RandomAccessBufferedFileInputStream.html" title="class in org.apache.pdfbox.io"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/pdfbox/io/RandomAccessBuffer.html" target="_top">Frames</a></li>
<li><a href="RandomAccessBuffer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All 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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&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.pdfbox.io</div>
<h2 title="Class RandomAccessBuffer" class="title">Class RandomAccessBuffer</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.pdfbox.io.RandomAccessBuffer</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a>, <a href="../../../../org/apache/pdfbox/io/RandomAccess.html" title="interface in org.apache.pdfbox.io">RandomAccess</a>, <a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a>, <a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html" title="interface in org.apache.pdfbox.io">RandomAccessWrite</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">RandomAccessBuffer</span>
extends <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="../../../../org/apache/pdfbox/io/RandomAccess.html" title="interface in org.apache.pdfbox.io">RandomAccess</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Cloneable.html?is-external=true" title="class or interface in java.lang">Cloneable</a></pre>
<div class="block">An implementation of the RandomAccess interface to store data in memory.
The data will be stored in chunks organized in an ArrayList.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#RandomAccessBuffer()">RandomAccessBuffer</a></strong>()</code>
<div class="block">Default constructor.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#RandomAccessBuffer(byte[])">RandomAccessBuffer</a></strong>(byte[]&nbsp;input)</code>
<div class="block">Create a random access buffer using the given byte array.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#RandomAccessBuffer(java.io.InputStream)">RandomAccessBuffer</a></strong>(<a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)</code>
<div class="block">Create a random access buffer of the given input stream by copying the data.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#available()">available</a></strong>()</code>
<div class="block">Returns an estimate of the number of bytes that can be read.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#clear()">clear</a></strong>()</code>
<div class="block">Clears all data of the buffer.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html" title="class in org.apache.pdfbox.io">RandomAccessBuffer</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#clone()">clone</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#close()">close</a></strong>()</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#getPosition()">getPosition</a></strong>()</code>
<div class="block">Returns offset of next byte to be returned by a read method.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#isClosed()">isClosed</a></strong>()</code>
<div class="block">Returns true if this stream has been closed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#isEOF()">isEOF</a></strong>()</code>
<div class="block">A simple test to see if we are at the end of the data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#length()">length</a></strong>()</code>
<div class="block">The total number of bytes that are available.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#peek()">peek</a></strong>()</code>
<div class="block">This will peek at the next byte.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#read()">read</a></strong>()</code>
<div class="block">Read a single byte of data.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#read(byte[])">read</a></strong>(byte[]&nbsp;b)</code>
<div class="block">Read a buffer of data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#read(byte[],%20int,%20int)">read</a></strong>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Read a buffer of data.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#readFully(int)">readFully</a></strong>(int&nbsp;length)</code>
<div class="block">Reads a given number of bytes.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#rewind(int)">rewind</a></strong>(int&nbsp;bytes)</code>
<div class="block">Seek backwards the given number of bytes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#seek(long)">seek</a></strong>(long&nbsp;position)</code>
<div class="block">Seek to a position in the data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#write(byte[])">write</a></strong>(byte[]&nbsp;b)</code>
<div class="block">Write a buffer of data to the stream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#write(byte[],%20int,%20int)">write</a></strong>(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)</code>
<div class="block">Write a buffer of data to the stream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html#write(int)">write</a></strong>(int&nbsp;b)</code>
<div class="block">Write a byte to the stream.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="RandomAccessBuffer()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RandomAccessBuffer</h4>
<pre>public&nbsp;RandomAccessBuffer()</pre>
<div class="block">Default constructor.</div>
</li>
</ul>
<a name="RandomAccessBuffer(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>RandomAccessBuffer</h4>
<pre>public&nbsp;RandomAccessBuffer(byte[]&nbsp;input)</pre>
<div class="block">Create a random access buffer using the given byte array.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - the byte array to be read</dd></dl>
</li>
</ul>
<a name="RandomAccessBuffer(java.io.InputStream)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>RandomAccessBuffer</h4>
<pre>public&nbsp;RandomAccessBuffer(<a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;input)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Create a random access buffer of the given input stream by copying the data.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>input</code> - the input stream to be read</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if something went wrong while copying the data</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="clone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clone</h4>
<pre>public&nbsp;<a href="../../../../org/apache/pdfbox/io/RandomAccessBuffer.html" title="class in org.apache.pdfbox.io">RandomAccessBuffer</a>&nbsp;clone()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a></code>&nbsp;in class&nbsp;<code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd>
</dl>
</li>
</ul>
<a name="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>public&nbsp;void&nbsp;close()
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/Closeable.html?is-external=true#close()" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/AutoCloseable.html?is-external=true#close()" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="clear()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>clear</h4>
<pre>public&nbsp;void&nbsp;clear()</pre>
<div class="block">Clears all data of the buffer.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html#clear()">clear</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html" title="interface in org.apache.pdfbox.io">RandomAccessWrite</a></code></dd>
</dl>
</li>
</ul>
<a name="seek(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>seek</h4>
<pre>public&nbsp;void&nbsp;seek(long&nbsp;position)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Seek to a position in the data.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#seek(long)">seek</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>position</code> - The position to seek to.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error while seeking.</dd></dl>
</li>
</ul>
<a name="getPosition()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPosition</h4>
<pre>public&nbsp;long&nbsp;getPosition()
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Returns offset of next byte to be returned by a read method.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#getPosition()">getPosition</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>offset of next byte which will be returned with next <a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#read()"><code>RandomAccessRead.read()</code></a>
(if no more bytes are left it returns a value &gt;= length of source)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd></dl>
</li>
</ul>
<a name="read()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read()
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Read a single byte of data.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#read()">read</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The byte of data that is being read.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error while reading the data.</dd></dl>
</li>
</ul>
<a name="read(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Read a buffer of data.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#read(byte[],%20int,%20int)">read</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - The buffer to write the data to.</dd><dd><code>offset</code> - Offset into the buffer to start writing.</dd><dd><code>length</code> - The amount of data to attempt to read.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The number of bytes that were actually read.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there was an error while reading the data.</dd></dl>
</li>
</ul>
<a name="length()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>length</h4>
<pre>public&nbsp;long&nbsp;length()
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">The total number of bytes that are available.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#length()">length</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The number of bytes available.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an IO error while determining the
length of the data stream.</dd></dl>
</li>
</ul>
<a name="write(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(int&nbsp;b)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write a byte to the stream.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html#write(int)">write</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html" title="interface in org.apache.pdfbox.io">RandomAccessWrite</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - The byte to write.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an IO error while writing.</dd></dl>
</li>
</ul>
<a name="write(byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(byte[]&nbsp;b)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write a buffer of data to the stream.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html#write(byte[])">write</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html" title="interface in org.apache.pdfbox.io">RandomAccessWrite</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - The buffer to get the data from.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error while writing the data.</dd></dl>
</li>
</ul>
<a name="write(byte[], int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>write</h4>
<pre>public&nbsp;void&nbsp;write(byte[]&nbsp;b,
int&nbsp;offset,
int&nbsp;length)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Write a buffer of data to the stream.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html#write(byte[],%20int,%20int)">write</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessWrite.html" title="interface in org.apache.pdfbox.io">RandomAccessWrite</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - The buffer to get the data from.</dd><dd><code>offset</code> - An offset into the buffer to get the data from.</dd><dd><code>length</code> - The length of data to write.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error while writing the data.</dd></dl>
</li>
</ul>
<a name="isClosed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isClosed</h4>
<pre>public&nbsp;boolean&nbsp;isClosed()</pre>
<div class="block">Returns true if this stream has been closed.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#isClosed()">isClosed</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
</dl>
</li>
</ul>
<a name="isEOF()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEOF</h4>
<pre>public&nbsp;boolean&nbsp;isEOF()
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">A simple test to see if we are at the end of the data.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#isEOF()">isEOF</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>true if we are at the end of the data.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error reading the next byte.</dd></dl>
</li>
</ul>
<a name="available()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>available</h4>
<pre>public&nbsp;int&nbsp;available()
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Returns an estimate of the number of bytes that can be read.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#available()">available</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes that can be read</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if this random access has been closed</dd></dl>
</li>
</ul>
<a name="peek()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>peek</h4>
<pre>public&nbsp;int&nbsp;peek()
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">This will peek at the next byte.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#peek()">peek</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Returns:</span></dt><dd>The next byte on the stream, leaving it as available to read.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error reading the next byte.</dd></dl>
</li>
</ul>
<a name="rewind(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>rewind</h4>
<pre>public&nbsp;void&nbsp;rewind(int&nbsp;bytes)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Seek backwards the given number of bytes.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#rewind(int)">rewind</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>bytes</code> - the number of bytes to be seeked backwards</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there is an error while seeking</dd></dl>
</li>
</ul>
<a name="readFully(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>readFully</h4>
<pre>public&nbsp;byte[]&nbsp;readFully(int&nbsp;length)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Reads a given number of bytes.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#readFully(int)">readFully</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>length</code> - the number of bytes to be read</dd>
<dt><span class="strong">Returns:</span></dt><dd>a byte array containing the bytes just read</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - if an I/O error occurs while reading data</dd></dl>
</li>
</ul>
<a name="read(byte[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>read</h4>
<pre>public&nbsp;int&nbsp;read(byte[]&nbsp;b)
throws <a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Read a buffer of data.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html#read(byte[])">read</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/pdfbox/io/RandomAccessRead.html" title="interface in org.apache.pdfbox.io">RandomAccessRead</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>b</code> - The buffer to write the data to.</dd>
<dt><span class="strong">Returns:</span></dt><dd>The number of bytes that were actually read.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/1.6.0/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - If there was an error while reading the data.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/RandomAccessBuffer.html">Use</a></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/pdfbox/io/RandomAccess.html" title="interface in org.apache.pdfbox.io"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/pdfbox/io/RandomAccessBufferedFileInputStream.html" title="class in org.apache.pdfbox.io"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/pdfbox/io/RandomAccessBuffer.html" target="_top">Frames</a></li>
<li><a href="RandomAccessBuffer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All 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>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&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><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2002&#x2013;2016 <a href="http://pdfbox.apache.org">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>