public byte[] exportPreferences(SharedPreferences preferences) throws IOException {
  ByteArrayOutputStream bufStream=new ByteArrayOutputStream(BUFFER_SIZE);
  DataOutputStream outWriter=new DataOutputStream(bufStream);
  exportPreferences(preferences,outWriter);
  return bufStream.toByteArray();
}

public byte [ ] exportPreferences ( SharedPreferences preferences ) throws IOException { ByteArrayOutputStream bufStream = new ByteArrayOutputStream ( BUFFER_SIZE ) ; DataOutputStream outWriter = new DataOutputStream ( bufStream ) ; exportPreferences ( preferences , outWriter ) ; return bufStream . toByteArray ( ) ; }
exports all shared preferences from the given object as a byte array .
