675

Java

public static byte[] copyFileToByte(String inName) throws FileNotFoundException, IOException{ InputStream is = new FileInputStream(inName); int count = 0; // the byte count ArrayList list = new ArrayList(); byte b[] = new byte[8192]; while ((count = is.read(b)) != -1) { list.add(b); } is.close( ); return (byte[]) list.toArray(); // nu merge conversia :(((}Cum sa fac ca sa intork un masiv de byte's ?
0