{filelink=23}
/**
* @(#)ExempleReadAllBytes.java
*
*
* @author
*sakoba(java.mesexemples.com) @version 1.00 2012/12/11
*/
import java.nio.file.*;
import java.nio.*;
public class ExempleReadAllBytes {
public static void main(String[] args) throws Exception
{
Path path = Paths.get("c:/test.txt");
// Lire les octets du fichier
byte[] contenu = Files.readAllBytes(path);
// Parcourir les octets et afficher les caractères correspondants
for (byte b : contenu)
{
System.out.print((char)b);
}
}
}
A Voir sur le même Sujet:
- décrypter un fichier chiffré avec sha digest java
- java files.readallbytes(file);
- lire un fichier xml java
- file bytes fichier parcourir
- java files readallbytes zip
- methode readAllBytes java
- Exception
- java readAllBytes
- file.readallbytes java cout
- readallbytes "javascript"