Java Array Remove removeTrailing(final byte[] id)

Here you can find the source of removeTrailing(final byte[] id)

Description

remove Trailing

License

BSD License

Declaration

public static byte[] removeTrailing(final byte[] id) 

Method Source Code

//package com.java2s;
//License from project: BSD License 

import java.util.Arrays;

public class Main {
    public static byte[] removeTrailing(final byte[] id) {
        final int length = id.length;
        if (length == 0) {
            return null;
        }//from  w ww.  j av a 2 s.  c om
        return Arrays.copyOf(id, length - 1);
    }
}

Related

  1. removeNullsFromStringArray(String[] array)
  2. removeOwnCookieNameFromCookieHeader(String ownCookieName, String[] cookies)
  3. removePointerFromDesc(String[] desc)
  4. removeRepeats(T[] array)
  5. removeRows(int[][] array, Collection rowsIndices)
  6. removeUser(String[] array, String user)
  7. removeValues(int[] values, int[] valuesToRemove)
  8. removeZeros(int n, byte[] message)