List of usage examples for java.io ByteArrayInputStream read
public synchronized int read()
From source file:com.flexoodb.common.FlexUtils.java
static public void saveStringToFile(String filepath, String content) throws Exception { ByteArrayInputStream is = new ByteArrayInputStream(content.getBytes()); java.io.FileOutputStream fos = new java.io.FileOutputStream(new File(filepath)); while (is.available() > 0) { fos.write(is.read()); }/*from w w w . jav a2 s . c o m*/ fos.close(); is.close(); }