Tabnine Logo
IoBuffer.getDouble
Code IndexAdd Tabnine to your IDE (free)

How to use
getDouble
method
in
org.apache.mina.codec.IoBuffer

Best Java code snippets using org.apache.mina.codec.IoBuffer.getDouble (Showing top 2 results out of 315)

origin: apache/mina

/**
 * @see ByteBuffer#getDouble(int)
 */
public double getDouble(int index) {
  return getDouble(getPointerByPosition(index));
}
origin: apache/mina

@Test
public void testDouble() {
  for (ByteOrder bo : new ByteOrder[] { ByteOrder.BIG_ENDIAN, ByteOrder.LITTLE_ENDIAN }) {
    ByteBuffer bb = (ByteBuffer) ByteBuffer.allocate(9).order(bo).putDouble(Math.PI).rewind();
    IoBuffer ioBuffer = IoBuffer.wrap(bb).order(bo);
    assertEquals(9, ioBuffer.capacity());
    ioBuffer.extend(7);
    ioBuffer.position(8);
    assertEquals(16, ioBuffer.capacity());
    ioBuffer.putDouble(-Math.E);
    ioBuffer.rewind();
    assertEquals(Math.PI, ioBuffer.getDouble(), 1E-10);
    assertEquals(-Math.E, ioBuffer.getDouble(), 1E-10);
    ioBuffer.rewind();
    ioBuffer.putDouble(4, 12.34);
    assertEquals(12.34, ioBuffer.getDouble(4), 1E-10);
  }
}
org.apache.mina.codecIoBuffergetDouble

Popular methods of IoBuffer

  • asInputStream
    Provides an input stream which is actually reading the IoBufferinstance. Further reads on the return
  • get
  • remaining
  • add
    Add one or more ByteBuffer to the current IoBuffer
  • array
  • capacity
  • getChar
  • getFloat
  • getInt
  • getLong
  • getShort
  • hasRemaining
  • getShort,
  • hasRemaining,
  • isDirect,
  • limit,
  • order,
  • position,
  • put,
  • putChar,
  • putDouble

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JComboBox (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Runner (org.openjdk.jmh.runner)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now