UNPKG

cassandra-server

Version:

A thin Javascript wrapper around Apache Cassandra to provide out of the box server support

679 lines (678 loc) 28.2 kB
<!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 (version 1.7.0_67) on Sun Sep 07 15:29:32 CEST 2014 --> <title>AbstractDataInput (apache-cassandra API)</title> <meta name="date" content="2014-09-07"> <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="AbstractDataInput (apache-cassandra 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/AbstractDataInput.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>Prev Class</li> <li><a href="../../../../../org/apache/cassandra/io/util/AbstractDataOutput.html" title="class in org.apache.cassandra.io.util"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/cassandra/io/util/AbstractDataInput.html" target="_top">Frames</a></li> <li><a href="AbstractDataInput.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.cassandra.io.util</div> <h2 title="Class AbstractDataInput" class="title">Class AbstractDataInput</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>java.io.InputStream</li> <li> <ul class="inheritance"> <li>org.apache.cassandra.io.util.AbstractDataInput</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable</dd> </dl> <dl> <dt>Direct Known Subclasses:</dt> <dd><a href="../../../../../org/apache/cassandra/utils/vint/EncodedDataInputStream.html" title="class in org.apache.cassandra.utils.vint">EncodedDataInputStream</a>, <a href="../../../../../org/apache/cassandra/io/util/MappedFileDataInput.html" title="class in org.apache.cassandra.io.util">MappedFileDataInput</a>, <a href="../../../../../org/apache/cassandra/io/util/MemoryInputStream.html" title="class in org.apache.cassandra.io.util">MemoryInputStream</a></dd> </dl> <hr> <br> <pre>public abstract class <span class="strong">AbstractDataInput</span> extends java.io.InputStream implements java.io.DataInput</pre> </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/cassandra/io/util/AbstractDataInput.html#AbstractDataInput()">AbstractDataInput</a></strong>()</code>&nbsp;</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>protected abstract int</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#getPosition()">getPosition</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readBoolean()">readBoolean</a></strong>()</code> <div class="block">Reads a boolean from the current position in this file.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>byte</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readByte()">readByte</a></strong>()</code> <div class="block">Reads an 8-bit byte from the current position in this file.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>char</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readChar()">readChar</a></strong>()</code> <div class="block">Reads a 16-bit character from the current position in this file.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>double</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readDouble()">readDouble</a></strong>()</code> <div class="block">Reads a 64-bit double from the current position in this file.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>float</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readFloat()">readFloat</a></strong>()</code> <div class="block">Reads a 32-bit float from the current position in this file.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readFully(byte[])">readFully</a></strong>(byte[]&nbsp;buffer)</code> <div class="block">Reads bytes from this file into <code>buffer</code>.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readFully(byte[],%20int,%20int)">readFully</a></strong>(byte[]&nbsp;buffer, int&nbsp;offset, int&nbsp;count)</code> <div class="block">Read bytes from this file into <code>buffer</code> starting at offset <code>offset</code>.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readInt()">readInt</a></strong>()</code> <div class="block">Reads a 32-bit integer from the current position in this file.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readLine()">readLine</a></strong>()</code> <div class="block">Reads a line of text form the current position in this file.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>long</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readLong()">readLong</a></strong>()</code> <div class="block">Reads a 64-bit long from the current position in this file.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>short</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readShort()">readShort</a></strong>()</code> <div class="block">Reads a 16-bit short from the current position in this file.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readUnsignedByte()">readUnsignedByte</a></strong>()</code> <div class="block">Reads an unsigned 8-bit byte from the current position in this file and returns it as an integer.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readUnsignedShort()">readUnsignedShort</a></strong>()</code> <div class="block">Reads an unsigned 16-bit short from the current position in this file and returns it as an integer.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#readUTF()">readUTF</a></strong>()</code> <div class="block">Reads a string that is encoded in <code>modified UTF-8</code> from this file.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected abstract void</code></td> <td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/io/util/AbstractDataInput.html#seekInternal(int)">seekInternal</a></strong>(int&nbsp;position)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.io.InputStream"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.io.InputStream</h3> <code>available, close, mark, markSupported, read, read, read, reset, skip</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, toString, wait, wait, wait</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.io.DataInput"> <!-- --> </a> <h3>Methods inherited from interface&nbsp;java.io.DataInput</h3> <code>skipBytes</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="AbstractDataInput()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>AbstractDataInput</h4> <pre>public&nbsp;AbstractDataInput()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="seekInternal(int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>seekInternal</h4> <pre>protected abstract&nbsp;void&nbsp;seekInternal(int&nbsp;position)</pre> </li> </ul> <a name="getPosition()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPosition</h4> <pre>protected abstract&nbsp;int&nbsp;getPosition()</pre> </li> </ul> <a name="readBoolean()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readBoolean</h4> <pre>public final&nbsp;boolean&nbsp;readBoolean() throws java.io.IOException</pre> <div class="block">Reads a boolean from the current position in this file. Blocks until one byte has been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readBoolean</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next boolean value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readByte()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readByte</h4> <pre>public final&nbsp;byte&nbsp;readByte() throws java.io.IOException</pre> <div class="block">Reads an 8-bit byte from the current position in this file. Blocks until one byte has been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readByte</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next signed 8-bit byte value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readChar()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readChar</h4> <pre>public final&nbsp;char&nbsp;readChar() throws java.io.IOException</pre> <div class="block">Reads a 16-bit character from the current position in this file. Blocks until two bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readChar</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next char value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readDouble()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readDouble</h4> <pre>public final&nbsp;double&nbsp;readDouble() throws java.io.IOException</pre> <div class="block">Reads a 64-bit double from the current position in this file. Blocks until eight bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readDouble</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next double value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readFloat()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readFloat</h4> <pre>public final&nbsp;float&nbsp;readFloat() throws java.io.IOException</pre> <div class="block">Reads a 32-bit float from the current position in this file. Blocks until four bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readFloat</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next float value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readFully(byte[])"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readFully</h4> <pre>public&nbsp;void&nbsp;readFully(byte[]&nbsp;buffer) throws java.io.IOException</pre> <div class="block">Reads bytes from this file into <code>buffer</code>. Blocks until <code>buffer.length</code> number of bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readFully</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - the buffer to read bytes into.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd> <dd><code>java.lang.NullPointerException</code> - if <code>buffer</code> is <code>null</code>.</dd></dl> </li> </ul> <a name="readFully(byte[], int, int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readFully</h4> <pre>public&nbsp;void&nbsp;readFully(byte[]&nbsp;buffer, int&nbsp;offset, int&nbsp;count) throws java.io.IOException</pre> <div class="block">Read bytes from this file into <code>buffer</code> starting at offset <code>offset</code>. This method blocks until <code>count</code> number of bytes have been read.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readFully</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - the buffer to read bytes into.</dd><dd><code>offset</code> - the initial position in <code>buffer</code> to store the bytes read from this file.</dd><dd><code>count</code> - the maximum number of bytes to store in <code>buffer</code>.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.lang.IndexOutOfBoundsException</code> - if <code>offset &lt; 0</code> or <code>count &lt; 0</code>, or if <code>offset + count</code> is greater than the length of <code>buffer</code>.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd> <dd><code>java.lang.NullPointerException</code> - if <code>buffer</code> is <code>null</code>.</dd></dl> </li> </ul> <a name="readInt()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readInt</h4> <pre>public&nbsp;int&nbsp;readInt() throws java.io.IOException</pre> <div class="block">Reads a 32-bit integer from the current position in this file. Blocks until four bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readInt</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next int value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readLine()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readLine</h4> <pre>public final&nbsp;java.lang.String&nbsp;readLine() throws java.io.IOException</pre> <div class="block">Reads a line of text form the current position in this file. A line is represented by zero or more characters followed by <code>'\n'</code>, <code>'\r'</code>, <code>"\r\n"</code> or the end of file marker. The string does not include the line terminating sequence. <p> Blocks until a line terminating sequence has been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readLine</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the contents of the line or <code>null</code> if no characters have been read before the end of the file has been reached.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readLong()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readLong</h4> <pre>public&nbsp;long&nbsp;readLong() throws java.io.IOException</pre> <div class="block">Reads a 64-bit long from the current position in this file. Blocks until eight bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readLong</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next long value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readShort()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readShort</h4> <pre>public&nbsp;short&nbsp;readShort() throws java.io.IOException</pre> <div class="block">Reads a 16-bit short from the current position in this file. Blocks until two bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readShort</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next short value from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readUnsignedByte()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readUnsignedByte</h4> <pre>public final&nbsp;int&nbsp;readUnsignedByte() throws java.io.IOException</pre> <div class="block">Reads an unsigned 8-bit byte from the current position in this file and returns it as an integer. Blocks until one byte has been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readUnsignedByte</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next unsigned byte value from this file as an int.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readUnsignedShort()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>readUnsignedShort</h4> <pre>public&nbsp;int&nbsp;readUnsignedShort() throws java.io.IOException</pre> <div class="block">Reads an unsigned 16-bit short from the current position in this file and returns it as an integer. Blocks until two bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readUnsignedShort</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next unsigned short value from this file as an int.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd></dl> </li> </ul> <a name="readUTF()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>readUTF</h4> <pre>public final&nbsp;java.lang.String&nbsp;readUTF() throws java.io.IOException</pre> <div class="block">Reads a string that is encoded in <code>modified UTF-8</code> from this file. The number of bytes that must be read for the complete string is determined by the first two bytes read from the file. Blocks until all required bytes have been read, the end of the file is reached or an exception is thrown.</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code>readUTF</code>&nbsp;in interface&nbsp;<code>java.io.DataInput</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the next string encoded in <code>modified UTF-8</code> from this file.</dd> <dt><span class="strong">Throws:</span></dt> <dd><code>java.io.EOFException</code> - if the end of this file is detected.</dd> <dd><code>java.io.IOException</code> - if this file is closed or another I/O error occurs.</dd> <dd><code>java.io.UTFDataFormatException</code> - if the bytes read cannot be decoded into a character string.</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/AbstractDataInput.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>Prev Class</li> <li><a href="../../../../../org/apache/cassandra/io/util/AbstractDataOutput.html" title="class in org.apache.cassandra.io.util"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/cassandra/io/util/AbstractDataInput.html" target="_top">Frames</a></li> <li><a href="AbstractDataInput.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 &copy; 2014 The Apache Software Foundation</small></p> </body> </html>