List of usage examples for android.app.backup BackupDataInputStream size
public int size()
From source file:com.csipsimple.backup.SipProfilesHelper.java
/** * Read data from the input stream/* w w w. j a va 2 s .com*/ * * @param data the input stream * @return the data * @throws IOException I/O error */ private String readData(BackupDataInputStream data) throws IOException { String dataS; byte[] buf = new byte[data.size()]; data.read(buf, 0, buf.length); ByteArrayInputStream bais = new ByteArrayInputStream(buf); DataInputStream dis = new DataInputStream(bais); dataS = dis.readUTF(); dis.close(); bais.close(); return dataS; }