My favorites
▼
|
Sign in
lineadecodigo
Web Code Samples in spanish
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
lineadecodigo_java
/
src
/
com
/
lineadecodigo
/
java
/
file
/
TamanioFichero.java
r478
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package com.lineadecodigo.java.file;
/**
* @file TamanioFichero.java
* @version 1.1
* @author Linea de Codigo (http://lineadecodigo.com)
* @date 7-julio-07
* @url http://lineadecodigo.com/2007/07/07/conocer-el-tamano-de-un-fichero-con-java/
* @description Conocer el tamaño de un fichero, en bytes, mediante la librería java.io.
*/
import java.io.File;
public class TamanioFichero {
public static void main(String[] args) {
String sFichero = "c:\\prueba.xml";
File fichero = new File(sFichero);
System.out.println("El tamaño del fichero " + sFichero +
" es: " + Long.toString(fichero.length()) + " bytes");
}
}
Show details
Hide details
Change log
r247
by vcuervo on May 29, 2010
Diff
Tamaño de un fichero
Go to:
...go/java/file/TamanioFichero.java
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 675 bytes, 25 lines
View raw file
Powered by
Google Project Hosting