congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
DefaultDataBuffer.getNativeBuffer
Code IndexAdd Tabnine to your IDE (free)

How to use
getNativeBuffer
method
in
org.springframework.core.io.buffer.DefaultDataBuffer

Best Java code snippets using org.springframework.core.io.buffer.DefaultDataBuffer.getNativeBuffer (Showing top 1 results out of 315)

origin: line/armeria

/**
 * Converts a {@link DataBuffer} into an {@link HttpData}.
 */
HttpData toHttpData(DataBuffer dataBuffer) {
  if (dataBuffer instanceof NettyDataBuffer) {
    return new ByteBufHttpData(((NettyDataBuffer) dataBuffer).getNativeBuffer(), false);
  }
  if (dataBuffer instanceof DefaultDataBuffer) {
    return new ByteBufHttpData(
        Unpooled.wrappedBuffer(((DefaultDataBuffer) dataBuffer).getNativeBuffer()), false);
  }
  return new ByteBufHttpData(Unpooled.wrappedBuffer(dataBuffer.asByteBuffer()), false);
}
org.springframework.core.io.bufferDefaultDataBuffergetNativeBuffer

Javadoc

Directly exposes the native ByteBuffer that this buffer is based on.

Popular methods of DefaultDataBuffer

  • write
  • <init>
  • allocate
  • asByteBuffer
  • assertIndex
  • calculateCapacity
    Calculate the capacity of the buffer.
  • capacity
  • checkIndex
  • ensureCapacity
  • fromEmptyByteBuffer
  • fromFilledByteBuffer
  • read
  • fromFilledByteBuffer,
  • read,
  • readPosition,
  • readableByteCount,
  • setNativeBuffer,
  • writableByteCount,
  • writePosition

Popular in Java

  • Finding current android device location
  • onRequestPermissionsResult (Fragment)
  • getSystemService (Context)
  • putExtra (Intent)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JPanel (javax.swing)
  • Top Sublime Text plugins
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