Java Array Print printfirstBytes(String comment, byte[] input)

Here you can find the source of printfirstBytes(String comment, byte[] input)

Description

printfirst Bytes

License

Open Source License

Declaration

public final static void printfirstBytes(String comment, byte[] input) 

Method Source Code

//package com.java2s;
/*/*  ww  w.  j  ava  2  s  . co m*/
 * Peafactory - Production of Password Encryption Archives
 * Copyright (C) 2015  Axel von dem Bruch
 * 
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU General Public License as published 
 * by the Free Software Foundation; either version 2 of the License, 
 * or (at your option) any later version.
 * This library 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 General Public License for more details.
 * See:  http://www.gnu.org/licenses/gpl-2.0.html
 * You should have received a copy of the GNU General Public License 
 * along with this library.
 */

public class Main {
    public final static void printfirstBytes(String comment, byte[] input) {
        System.out.println("\n" + comment);
        for (int i = 0; i < 32; i++) {
            if (i > 0 && i % 32 == 0)
                System.out.println("");
            System.out.print(" " + input[i]);
        }
        System.out.println("");
    }
}

Related

  1. printArrayInfo(int[] array)
  2. printArrayNoSpaces(int[] nums)
  3. printArrayRec(int[] workArray, int idx)
  4. printArrayToString(Object[] array)
  5. printErrInvocationString(String cls, String[] args)
  6. printFloatArray(float[] arr)
  7. printFloatArray(float[] array)
  8. println(int[] array)
  9. println(Object[] objs)