Here you can find the source of SliceByteArray(byte data[], int offset, int length)
Parameter | Description |
---|---|
data | a parameter |
offset | a parameter |
length | a parameter |
public static byte[] SliceByteArray(byte data[], int offset, int length)
//package com.java2s; /******************************************************************************* * Copyright (c) 2008, 2014 IBM Corp./*from w w w . j a va 2s .co m*/ * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this distribution. * * The Eclipse Public License is available at * http://www.eclipse.org/legal/epl-v10.html * and the Eclipse Distribution License is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * Contributors: * Ian Craggs - initial API and implementation and/or initial documentation *******************************************************************************/ public class Main { /** * @param data * @param offset * @param length * @return */ public static byte[] SliceByteArray(byte data[], int offset, int length) { byte temp[] = new byte[length]; System.arraycopy(data, offset, temp, 0, length); return (temp); } }