标签:
public String readSDFile(String filePath)
{
StringBuffer sb = new StringBuffer();
File file = new File(filePath);
try
{
FileInputStream fis = new FileInputStream(file);
int c;
while ((c = fis.read()) != -1)
{
sb.append((char) c);
}
fis.close();
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
return sb.toString();
}
标签:
原文地址:http://www.cnblogs.com/lizia/p/4626272.html