Java ByteBuffer Get getFromBack(ByteBuffer bb)

Here you can find the source of getFromBack(ByteBuffer bb)

Description

get From Back

License

Open Source License

Declaration

public static byte getFromBack(ByteBuffer bb) 

Method Source Code


//package com.java2s;
/* Description and License
 * MCBMini is a complete, open-source, flexible and scalable
 * motor control scheme with board designs, firmware and host
 * software.//from  ww w  .  j  a va 2 s  .  c  o  m
 * This is the host software for MCBMini called MCBMiniServer
 * The MCBMini project can be downloaded from:
 * http://code.google.com/p/mcbmini/
 *
 * (c) Sigurdur Orn Adalgeirsson (siggi@alum.mit.edu)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation;
 * version 2 of the License.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General
 * Public License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA  02111-1307  USA
 */

import java.nio.ByteBuffer;

public class Main {
    public static byte getFromBack(ByteBuffer bb) {
        byte ret = bb.get(bb.limit() - 1);
        bb.limit(bb.limit() - 1);
        return ret;
    }
}

Related

  1. getEmptyByteBuffer()
  2. getFixedBytes(ByteBuffer buffer, int length)
  3. getFloat(ByteBuffer b, int n)
  4. getFloat(ByteBuffer buffer)
  5. getFloat(ByteBuffer floatCalculator, byte[] bytes)
  6. getHashBytes(ByteBuffer bb)
  7. getHSBfromRGB(final ByteBuffer pixels, final float[] result, int pixelSize)
  8. getIncreasingByteBuffer(int len)
  9. getIPv4String(ByteBuffer buffer)