Here you can find the source of getTenByteNumber()
public static String getTenByteNumber()
//package com.java2s; //License from project: Open Source License import java.util.Random; public class Main { private static Random rd = new Random(); public static String getTenByteNumber() { String tenByte = ""; for (int i = 0; i < 10; i++) { tenByte = tenByte + rd.nextInt(9); }//from w w w . j a v a 2 s .c om return tenByte; } }