<h2>org.das2.qds.buffer.BufferDataSet</h2><p>rank 1, 2, 3, and 4 datasets backed by NIO buffers. These have the advantage that data can be stored outside of the JVM, and in fact they can be backed by a huge file on disk. This code was copied from BinaryDataSource.</p> <h2>BufferDataSet( int rank, int reclen, int recoffs, int len0, int len1, int len2, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html'>java.nio.ByteBuffer</a> back )</h2> <p>Create a new BufferDataSet of the given type. Simple sanity checks are made, including:<ul> <li>rank 1 dataset may not have len1>1. <li>reclen cannot be shorter than the byte length of the field type. <li>buffer must have room for the dataset </ul></p> <h2>BufferDataSet( int rank, int reclen, int recoffs, int len0, int len1, int len2, int len3, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html'>java.nio.ByteBuffer</a> back )</h2> <p>Create a new BufferDataSet of the given type. Simple sanity checks are made, including:<ul> <li>rank 1 dataset may not have len1>1. <li>reclen cannot be shorter than the byte length of the field type. <li>buffer must have room for the dataset </ul></p> <h2>BufferDataSet( int rank, int reclen, int recoffs, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> bitByte, int len0, int len1, int len2, int len3, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html'>java.nio.ByteBuffer</a> back )</h2> <p>Create a new BufferDataSet of the given type. Simple sanity checks are made, including:<ul> <li>rank 1 dataset may not have len1>1. <li>reclen cannot be shorter than the byte length of the field type. <li>buffer must have room for the dataset </ul></p> <hr> <a name="DOUBLE"></a> <h2>DOUBLE</h2> <p>the data is in 8 byte doubles.</p> <hr> <a name="FLOAT"></a> <h2>FLOAT</h2> <p>the data is in 4 byte floats.</p> <hr> <a name="TRUNCATEDFLOAT"></a> <h2>TRUNCATEDFLOAT</h2> <p>the data is in 16 bit real that has exponent like a FLOAT but mantissa precision is reduced.</p> <hr> <a name="VAX_FLOAT"></a> <h2>VAX_FLOAT</h2> <p>VAX floats.</p> <hr> <a name="INT24"></a> <h2>INT24</h2> <p>three-byte ints.</p> <hr> <a name="UINT24"></a> <h2>UINT24</h2> <p>three-byte unsigned ints.</p> <hr> <a name="NYBBLE"></a> <h2>NYBBLE</h2> <p>four-bit unsigned ints.</p> <hr> <a name="LONG"></a> <h2>LONG</h2> <p>8 byte signed longs.</p> <hr> <a name="INT"></a> <h2>INT</h2> <p>4 byte signed integers.</p> <hr> <a name="INTEGER"></a> <h2>INTEGER</h2> <p>4 byte signed integers, INT is canonical but INTEGER should be accepted.</p> <hr> <a name="UINT"></a> <h2>UINT</h2> <p>4 byte unsigned integers. Note 4-byte signed ints are used to store the data which is unpacked in the value() method.</p> <hr> <a name="SHORT"></a> <h2>SHORT</h2> <p>2 byte short integer.</p> <hr> <a name="USHORT"></a> <h2>USHORT</h2> <p>2 byte unsigned short.</p> <hr> <a name="BYTE"></a> <h2>BYTE</h2> <p>1 byte signed byte.</p> <hr> <a name="UBYTE"></a> <h2>UBYTE</h2> <p>1 byte unsigned byte.</p> <hr> <a name="BYTES"></a> <h2>BYTES</h2> <p>constructor units are in bytes.</p> <hr> <a name="BITS"></a> <h2>BITS</h2> <p>constructor units are in bits.</p> <hr> <a name="about"></a> <h2>about</h2> about( ) → void <p>print some info about this BufferDataSet.</p> <h3>Returns:</h3> void (returns nothing) <br><br> <a href="https://github.com/autoplot/dev/search?q=about&unscoped_q=about">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#about">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1549">[view source]</a> <br> <br> <hr> <a name="append"></a> <h2>append</h2> append( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> ds ) → void <p>append the dataset with the same geometry but different number of records (zeroth dim) to this. An IllegalArgumentException is thrown when there is not enough room. See grow(newRecCount). This buffer's capacity will be something like java.nio.DirectByteBuffer[pos=0 lim=6256 cap=13760] and the dataset ds's buffer will have java.nio.DirectByteBufferR[pos=0 lim=6256 cap=6256]. After this append operation, the buffer of the second will be copied into the first's: java.nio.DirectByteBuffer[pos=0 lim=12512 cap=13760]. Not thread safe--we need to go through and make it so...</p> <h3>Parameters</h3> ds - a BufferDataSet <h3>Returns:</h3> void (returns nothing) <h3>See Also:</h3> <a href='null'>grow(int)</a> <br> <br><br> <a href="https://github.com/autoplot/dev/search?q=append&unscoped_q=append">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#append">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l825">[view source]</a> <br> <br> append( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> ths, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> ds ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a><br> <hr> <a name="bitCount"></a> <h2>bitCount</h2> bitCount( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type ) → int <p></p> <h3>Parameters</h3> type - an Object <h3>Returns:</h3> int <br><br> <a href="https://github.com/autoplot/dev/search?q=bitCount&unscoped_q=bitCount">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#bitCount">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l154">[view source]</a> <br> <br> <hr> <a name="byteCount"></a> <h2>byteCount</h2> byteCount( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type ) → int <p>return the number of bytes of each type (double=8, etc).</p> <h3>Parameters</h3> type - DOUBLE, FLOAT, UBYTE, TIME28, etc. <h3>Returns:</h3> 8, 4, 1, etc. <br><br> <a href="https://github.com/autoplot/dev/search?q=byteCount&unscoped_q=byteCount">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#byteCount">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l168">[view source]</a> <br> <br> <hr> <a name="canAppend"></a> <h2>canAppend</h2> canAppend( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> ds ) → boolean <p>return true if the dataset can be appended. Note this assumes that the same length, etc. This just checks that we have the number of spare records in the backing store.</p> <h3>Parameters</h3> ds - dataset of the same rank and len1, len2, and len3. <h3>Returns:</h3> true if the dataset can be appended. <br><br> <a href="https://github.com/autoplot/dev/search?q=canAppend&unscoped_q=canAppend">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#canAppend">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l699">[view source]</a> <br> <br> <hr> <a name="compact"></a> <h2>compact</h2> compact( ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>get rid of extra spaces between records.</p> <h3>Returns:</h3> new BufferDataSet without gaps. <br><br> <a href="https://github.com/autoplot/dev/search?q=compact&unscoped_q=compact">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#compact">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1603">[view source]</a> <br> <br> <hr> <a name="copy"></a> <h2>copy</h2> copy( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>return a copy of the data. If the data is a BufferDataSet, then a new BufferDataSet is used for the copy. Note this does not consider isMutable. If the dataset is not mutable, then the original data could be returned (probably).</p> <h3>Parameters</h3> ds - any qube dataset. <h3>Returns:</h3> a BufferDataSet copy of the dataset. <br><br> <a href="https://github.com/autoplot/dev/search?q=copy&unscoped_q=copy">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#copy">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l650">[view source]</a> <br> <br> copy( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a><br> <hr> <a name="create"></a> <h2>create</h2> create( int rank, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, int len0, int[] size ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>create a dataset backed by the given type.</p> <h3>Parameters</h3> rank - the rank of the data <br> type - DOUBLE, FLOAT, UINT, etc <br> len0 - number of records (ignored for rank 0). <br> size - size of each record <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=create&unscoped_q=create">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#create">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l530">[view source]</a> <br> <br> <hr> <a name="createRank0"></a> <h2>createRank0</h2> createRank0( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>create a rank 0 dataset backed by the given type.</p> <h3>Parameters</h3> type - DOUBLE, FLOAT, UINT, etc <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=createRank0&unscoped_q=createRank0">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#createRank0">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l546">[view source]</a> <br> <br> <hr> <a name="createRank1"></a> <h2>createRank1</h2> createRank1( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, int len0 ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>create a rank 1 dataset backed by the given type.</p> <h3>Parameters</h3> type - DOUBLE, FLOAT, UINT, etc <br> len0 - length of the zeroth index <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=createRank1&unscoped_q=createRank1">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#createRank1">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l559">[view source]</a> <br> <br> <hr> <a name="createRank2"></a> <h2>createRank2</h2> createRank2( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, int len0, int len1 ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>create a rank 2 dataset backed by the given type.</p> <h3>Parameters</h3> type - DOUBLE, FLOAT, UINT, etc <br> len0 - length of the zeroth index <br> len1 - length of the first index <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=createRank2&unscoped_q=createRank2">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#createRank2">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l576">[view source]</a> <br> <br> <hr> <a name="createRank3"></a> <h2>createRank3</h2> createRank3( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, int len0, int len1, int len2 ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>create a rank 3 dataset backed by the given type.</p> <h3>Parameters</h3> type - DOUBLE, FLOAT, UINT, etc <br> len0 - length of the zeroth index <br> len1 - length of the first index <br> len2 - length of the second index <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=createRank3&unscoped_q=createRank3">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#createRank3">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l594">[view source]</a> <br> <br> <hr> <a name="createRank4"></a> <h2>createRank4</h2> createRank4( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type, int len0, int len1, int len2, int len3 ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>create a rank 4 dataset backed by the given type.</p> <h3>Parameters</h3> type - DOUBLE, FLOAT, UINT, etc <br> len0 - length of the zeroth index <br> len1 - length of the first index <br> len2 - length of the second index <br> len3 - length of the third index <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=createRank4&unscoped_q=createRank4">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#createRank4">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l613">[view source]</a> <br> <br> <hr> <a name="getCompatibleComponentType"></a> <h2>getCompatibleComponentType</h2> getCompatibleComponentType( ) → <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html'>java.lang.Class</a> <p>return the Java type that is capable of containing elements of this dataset. For unsigned types, the next Java class is used, for example int.class is used to store unsigned shorts.</p> <h3>Returns:</h3> double.class, float.class, long.class, etc. <br><br> <a href="https://github.com/autoplot/dev/search?q=getCompatibleComponentType&unscoped_q=getCompatibleComponentType">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#getCompatibleComponentType">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1563">[view source]</a> <br> <br> <hr> <a name="getFieldStride"></a> <h2>getFieldStride</h2> getFieldStride( ) → int <p>return the number of bytes to advance for each field.</p> <h3>Returns:</h3> the number of bytes to advance for each field. <br><br> <a href="https://github.com/autoplot/dev/search?q=getFieldStride&unscoped_q=getFieldStride">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#getFieldStride">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l414">[view source]</a> <br> <br> <hr> <a name="getRecordStride"></a> <h2>getRecordStride</h2> getRecordStride( ) → int <p>return the number of bytes to advance for each record.</p> <h3>Returns:</h3> the number of bytes to advance for each record. <br><br> <a href="https://github.com/autoplot/dev/search?q=getRecordStride&unscoped_q=getRecordStride">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#getRecordStride">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l434">[view source]</a> <br> <br> <hr> <a name="getType"></a> <h2>getType</h2> getType( ) → <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> <p>return the type of this dataset, for example BufferDataSet.INT, BufferDataSet.DOUBLE, etc...</p> <h3>Returns:</h3> the type of this dataset. <br><br> <a href="https://github.com/autoplot/dev/search?q=getType&unscoped_q=getType">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#getType">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1315">[view source]</a> <br> <br> <hr> <a name="grow"></a> <h2>grow</h2> grow( int newRecCount ) → void <p>grow the internal store so that append may be used to resize the dataset. This simply grows the internal buffer, so for example length() will return the same value after.</p> <h3>Parameters</h3> newRecCount - the new record count, generally larger than the old rec count. <h3>Returns:</h3> void (returns nothing) <h3>See Also:</h3> <a href='null'>append(org.das2.qds.buffer.BufferDataSet)</a> <br> <br><br> <a href="https://github.com/autoplot/dev/search?q=grow&unscoped_q=grow">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#grow">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1275">[view source]</a> <br> <br> <hr> <a name="guessBackingStore"></a> <h2>guessBackingStore</h2> guessBackingStore( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds ) → <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> <p>guess the type of the backing store, returning double.class if it cannot be determined.</p> <h3>Parameters</h3> ds - the dataset <h3>Returns:</h3> the backing store class, one of double.class, float.class, etc. <br><br> <a href="https://github.com/autoplot/dev/search?q=guessBackingStore&unscoped_q=guessBackingStore">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#guessBackingStore">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l665">[view source]</a> <br> <br> <hr> <a name="isCompact"></a> <h2>isCompact</h2> isCompact( ) → boolean <p>returns true if the dataset is compact, meaning that there are no gaps between records, and no byte offset.</p> <h3>Returns:</h3> true if the dataset is compact <br><br> <a href="https://github.com/autoplot/dev/search?q=isCompact&unscoped_q=isCompact">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#isCompact">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1594">[view source]</a> <br> <br> <hr> <a name="jvmMemory"></a> <h2>jvmMemory</h2> jvmMemory( ) → int <p>estimate the jvmMemory occupied by this dataset, looking at the NIO buffer to see if it is direct as has no JVM memory cost, or if it has been made into an array.</p> <h3>Returns:</h3> the estimated number bytes that the dataSet occupies. <br><br> <a href="https://github.com/autoplot/dev/search?q=jvmMemory&unscoped_q=jvmMemory">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#jvmMemory">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1536">[view source]</a> <br> <br> <hr> <a name="length"></a> <h2>length</h2> length( ) → int <p></p> <h3>Returns:</h3> int <br><br> <a href="https://github.com/autoplot/dev/search?q=length&unscoped_q=length">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#length">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1325">[view source]</a> <br> <br> length( int i ) → int<br> length( int i0, int i1 ) → int<br> length( int i0, int i1, int i2 ) → int<br> <hr> <a name="makeDataSet"></a> <h2>makeDataSet</h2> makeDataSet( int rank, int reclen, int recoffs, int len0, int len1, int len2, int len3, <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html'>java.nio.ByteBuffer</a> buf, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>Make a BufferDataSet of the given type.</p> <h3>Parameters</h3> rank - the rank (number of indeces) of the data. <br> reclen - length in bytes of each record. This may be longer than len1*len2*len3*byteCount(type) <br> recoffs - byte offset of each record <br> len0 - number of elements in the first index <br> len1 - number of elements in the second index <br> len2 - number of elements in the third index <br> len3 - number of elements in the fourth index <br> buf - ByteBuffer containing the data, which should be at least recoffs + reclen * len0 bytes long. <br> type - BufferDataSet.INT, BufferDataSet.DOUBLE, etc... <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=makeDataSet&unscoped_q=makeDataSet">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#makeDataSet">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l257">[view source]</a> <br> <br> makeDataSet( int rank, int reclen, int recoffs, int[] qube, <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html'>java.nio.ByteBuffer</a> buf, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a><br> <hr> <a name="makeDataSetBits"></a> <h2>makeDataSetBits</h2> makeDataSetBits( int rank, int reclenbits, int recoffsbits, int len0, int len1, int len2, int len3, <a href='https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html'>java.nio.ByteBuffer</a> buf, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> type ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>support binary types that are not a multiple of 8 bits. This was added to support Nybbles, and 12-bit ints.</p> <h3>Parameters</h3> rank - an int <br> reclenbits - number of bits per record <br> recoffsbits - number of bits offset. Note this must be a multiple of 8, for now. <br> len0 - number of elements in the first index <br> len1 - number of elements in the second index <br> len2 - number of elements in the third index <br> len3 - number of elements in the fourth index <br> buf - ByteBuffer containing the data, which should be at least recoffsbits/8 + reclenbits/8 * len0 bytes long. <br> type - BufferDataSet.NYBBLE, etc <h3>Returns:</h3> BufferDataSet of the given type. <br><br> <a href="https://github.com/autoplot/dev/search?q=makeDataSetBits&unscoped_q=makeDataSetBits">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#makeDataSetBits">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l222">[view source]</a> <br> <br> <hr> <a name="maybeCopy"></a> <h2>maybeCopy</h2> maybeCopy( <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> ds ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/buffer/BufferDataSet.html'>org.das2.qds.buffer.BufferDataSet</a> <p>Copy the dataset to an BufferDataSet only if the dataset is not already an BufferDataSet.</p> <h3>Parameters</h3> ds - a QDataSet <h3>Returns:</h3> a BufferDataSet. <br><br> <a href="https://github.com/autoplot/dev/search?q=maybeCopy&unscoped_q=maybeCopy">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#maybeCopy">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l684">[view source]</a> <br> <br> <hr> <a name="rank"></a> <h2>rank</h2> rank( ) → int <p></p> <h3>Returns:</h3> int <br><br> <a href="https://github.com/autoplot/dev/search?q=rank&unscoped_q=rank">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#rank">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1320">[view source]</a> <br> <br> <hr> <a name="setFieldStride"></a> <h2>setFieldStride</h2> setFieldStride( int bytes ) → void <p>allow clients to override the cadence of data. By default, this is just the number of bytes in each field.</p> <h3>Parameters</h3> bytes - number of bytes between field beginnings. <h3>Returns:</h3> void (returns nothing) <br><br> <a href="https://github.com/autoplot/dev/search?q=setFieldStride&unscoped_q=setFieldStride">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#setFieldStride">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l403">[view source]</a> <br> <br> <hr> <a name="setLength"></a> <h2>setLength</h2> setLength( int len0 ) → void <p>reset the number of records.</p> <h3>Parameters</h3> len0 - the new number of records. <h3>Returns:</h3> void (returns nothing) <br><br> <a href="https://github.com/autoplot/dev/search?q=setLength&unscoped_q=setLength">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#setLength">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l442">[view source]</a> <br> <br> <hr> <a name="setLength1"></a> <h2>setLength1</h2> setLength1( int len1 ) → void <p>reset the length (in fields) of each record of the rank 2 dataset.</p> <h3>Parameters</h3> len1 - the length of each record of the rank 2 dataset. <h3>Returns:</h3> void (returns nothing) <h3>See Also:</h3> <a href='null'>Ops#decimateBufferDataSet(org.das2.qds.buffer.BufferDataSet, int, int)</a> <br> <br><br> <a href="https://github.com/autoplot/dev/search?q=setLength1&unscoped_q=setLength1">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#setLength1">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l454">[view source]</a> <br> <br> <hr> <a name="setRecordStride"></a> <h2>setRecordStride</h2> setRecordStride( int bytes ) → void <p>allow clients to override the cadece of the records. By default, this is the number of bytes in each record.</p> <h3>Parameters</h3> bytes - number of bytes between record beginnings. <h3>Returns:</h3> void (returns nothing) <br><br> <a href="https://github.com/autoplot/dev/search?q=setRecordStride&unscoped_q=setRecordStride">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#setRecordStride">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l423">[view source]</a> <br> <br> <hr> <a name="shouldAllocateDirect"></a> <h2>shouldAllocateDirect</h2> shouldAllocateDirect( ) → int <p>return 1 if direct allocate should be used, 0 if not. Direct allocations are memory allocations outside of the JVM heap memory. (The internal variable has a -1 initial state, which is why this is not boolean.) This looks for 32bit Javas, and if more than 1/2 Gig is being used then it will allocate direct. This is because 32bit Javas cannot access any memory outside of 1Gig.</p> <h3>Returns:</h3> 1 or 0 if direct allocations should not be made. <h3>See Also:</h3> <a href='https://sourceforge.net/p/autoplot/bugs/1395/'>https://sourceforge.net/p/autoplot/bugs/1395/</a> <br> <a href='http://stackoverflow.com/questions/807263/how-do-i-detect-which-kind-of-jre-is-installed-32bit-vs-64bit'>http://stackoverflow.com/questions/807263/how-do-i-detect-which-kind-of-jre-is-installed-32bit-vs-64bit</a> <br> <a href='http://stackoverflow.com/questions/3651737/why-the-odd-performance-curve-differential-between-bytebuffer-allocate-and-byt "How ByteBuffer works and why Direct '>http://stackoverflow.com/questions/3651737/why-the-odd-performance-curve-differential-between-bytebuffer-allocate-and-byt "How ByteBuffer works and why Direct (Byte)</a> "How ByteBuffer works and why Direct (Byte)Buffers are the only truly useful now"<br> <br><br> <a href="https://github.com/autoplot/dev/search?q=shouldAllocateDirect&unscoped_q=shouldAllocateDirect">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#shouldAllocateDirect">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l735">[view source]</a> <br> <br> <hr> <a name="slice"></a> <h2>slice</h2> slice( int i ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> <p></p> <h3>Parameters</h3> i - an int <h3>Returns:</h3> org.das2.qds.QDataSet <br><br> <a href="https://github.com/autoplot/dev/search?q=slice&unscoped_q=slice">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#slice">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1476">[view source]</a> <br> <br> <hr> <a name="trim"></a> <h2>trim</h2> trim( int ist, int ien ) → <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/qds/QDataSet.html'>QDataSet</a> <p></p> <h3>Parameters</h3> ist - an int <br> ien - an int <h3>Returns:</h3> org.das2.qds.QDataSet <br><br> <a href="https://github.com/autoplot/dev/search?q=trim&unscoped_q=trim">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#trim">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1456">[view source]</a> <br> <br> <hr> <a name="typeFor"></a> <h2>typeFor</h2> typeFor( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html'>java.lang.Class</a> c ) → <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html'>Object</a> <p>Return the type for the given class. Note that there is a type for each native type (Byte,Short,Float,etc), but not a class for each type. (E.g. UBYTE is unsigned byte.)</p> <h3>Parameters</h3> c - java class <h3>Returns:</h3> DOUBLE,FLOAT,etc. <br><br> <a href="https://github.com/autoplot/dev/search?q=typeFor&unscoped_q=typeFor">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#typeFor">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1182">[view source]</a> <br> <br> <hr> <a name="value"></a> <h2>value</h2> value( ) → double <p></p> <h3>Returns:</h3> double <br><br> <a href="https://github.com/autoplot/dev/search?q=value&unscoped_q=value">[search for examples]</a> <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/das2/qds/buffer/BufferDataSet.md">[view on GitHub]</a> <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/das2/qds/buffer/BufferDataSet.html#value">[view on old javadoc]</a> <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/QDataSet/src/org/das2/qds/buffer/BufferDataSet.java#l1441">[view source]</a> <br> <br> value( int i0 ) → double<br> value( int i0, int i1 ) → double<br> value( int i0, int i1, int i2 ) → double<br> value( int i0, int i1, int i2, int i3 ) → double<br>