Java Array Min Value minLengthCheck(final byte[] buffer, final byte length)

Here you can find the source of minLengthCheck(final byte[] buffer, final byte length)

Description

min Length Check

License

Open Source License

Declaration

private static void minLengthCheck(final byte[] buffer, final byte length) 

Method Source Code

//package com.java2s;
/**/*from w  ww.  j ava 2s. c  o m*/
 * jModuleConnect is an framework for communication and file management on modem 
 * modules.
 * 
 * This project was inspired by the project TC65SH 
 * by Christoph Vilsmeier: <http://www.vilsmeier-consulting.de/tc65sh.html>
 * 
 * Copyright (C) 2015 sitec systems GmbH <http://www.sitec-systems.de>
 * 
 * This file is part of jModuleConnect.
 * 
 * jModuleConnect 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, either version 3 of the License, or (at your option) 
 * any later version.
 * 
 * jModuleConnect 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 jModuleConnect. If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    private static void minLengthCheck(final byte[] buffer, final byte length) {
        if (buffer.length < length) {
            throw new IllegalArgumentException("Input array length must be min " + length + " bytes");
        }
    }
}

Related

  1. minIndex(Number[] array)
  2. minIndexGreaterThan(final double[] array, final double p)
  3. minInRowIndex(double[][] M, int row)
  4. minInt(int... values)
  5. minkowskiDistance(double[] coord1, double[] coord2)
  6. minList(int[] listA, int[] listB)
  7. minLocation(double[] list)
  8. minmax(double[] a)
  9. minMax(float... values)