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

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

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

origin: apache/mina

/**
 * @see ByteBuffer#putDouble(double)
 */
public IoBuffer putDouble(double value) {
  return putDouble(position, value);
}
origin: apache/mina

/**
 * @see ByteBuffer#putDouble(int, double)
 */
public IoBuffer putDouble(int index, double value) {
  return putDouble(getPointerByPosition(index), value);
}
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.codecIoBufferputDouble

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
  • getDouble
  • getFloat
  • getInt
  • getLong
  • getShort
  • getLong,
  • getShort,
  • hasRemaining,
  • isDirect,
  • limit,
  • order,
  • position,
  • put,
  • putChar

Popular in Java

  • Making http requests using okhttp
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
  • Kernel (java.awt.image)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • CodeWhisperer 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