Here you can find the source of copyBytes(byte[] src, int start, int end)
Parameter | Description |
---|---|
src | a parameter |
start | a parameter |
end | a parameter |
public static byte[] copyBytes(byte[] src, int start, int end)
//package com.java2s; /**// w w w . ja v a 2s .c o m * Confidential Information. * Copyright (C) 2007-2009 Eric Link, All rights reserved. * PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. **/ public class Main { /** * Copy bytes from src to dest, if they are available in src * @param src * @param start * @param end * @return */ public static byte[] copyBytes(byte[] src, int start, int end) { int length = end - start; byte[] dest = new byte[length]; for (int i = 0; i < length && i < src.length; i++) { dest[i] = src[i - start]; } return dest; } }