Java ByteBuffer Get getNumeric(java.nio.ByteBuffer buffer, int len)

Here you can find the source of getNumeric(java.nio.ByteBuffer buffer, int len)

Description

get Numeric

License

Open Source License

Declaration

public static int getNumeric(java.nio.ByteBuffer buffer, int len) 

Method Source Code

//package com.java2s;

public class Main {
    public static int getNumeric(java.nio.ByteBuffer buffer, int len) {
        String s = "";
        if (null != buffer && buffer.remaining() >= len) {
            byte[] dest = new byte[len];
            buffer.get(dest, 0, len);/*from   w  w w .  j  a v  a  2s. c o m*/
            s = new String(dest);
        }
        return Integer.parseInt(s);
    }
}

Related

  1. getMultiString(ByteBuffer bb, boolean wideChar)
  2. getNaluStartLength(ByteBuffer buffer)
  3. getNextTagNum(ByteBuffer message)
  4. getNTString(ByteBuffer buffer)
  5. getNullTerminatedByte(ByteBuffer buffer)
  6. getObject(ByteBuffer buffer)
  7. getObject(ByteBuffer byteBuffer)
  8. getProfileIdc(ByteBuffer spsBuffer)
  9. getQuickchatParam(ByteBuffer buf, int size)