Here you can find the source of minLengthCheck(final byte[] buffer, final byte length)
private static void minLengthCheck(final byte[] buffer, final byte length)
//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"); } } }