UTF-8 filesystem check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
/** | |
* Created by moon on 12/8/15. | |
*/ | |
public class Check | |
{ | |
public static void main(String[] args) | |
{ | |
File file = new File("/local/web/files/publications/storage//0c80202e-c968-4bc4-a70b-63e63bfaba94_Renz et al. 2015 - Regulation of β1 Integrin-Klf2-Mediated Angiogenesis by CCM Proteins.pdf"); | |
System.out.println( file.exists() ); | |
try | |
{ | |
FileInputStream is = new FileInputStream( file ); | |
System.out.println(is.available()); | |
is.close(); | |
} | |
catch ( FileNotFoundException e ) | |
{ | |
e.printStackTrace(); | |
} | |
catch ( IOException e ) | |
{ | |
e.printStackTrace(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment