Skip to content

Instantly share code, notes, and snippets.

@hkmoon
Created December 14, 2015 15:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save hkmoon/baa0f910d3a2c1fc438c to your computer and use it in GitHub Desktop.
UTF-8 filesystem check
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