private void readAndSetPreference(String name,byte typeId,DataInputStream reader,Editor editor) throws IOException {
  boolean save=true;
  if (doNotBackup.contains(name)) {
    save=false;
  }
switch (typeId) {
case ContentTypeIds.BOOLEAN_TYPE_ID:
    boolean booleanValue=reader.readBoolean();
  if (save) {
    editor.putBoolean(name,booleanValue);
  }
return;
case ContentTypeIds.LONG_TYPE_ID:
long longValue=reader.readLong();
if (save) {
editor.putLong(name,longValue);
}
return;
case ContentTypeIds.FLOAT_TYPE_ID:
float floatValue=reader.readFloat();
if (save) {
editor.putFloat(name,floatValue);
}
return;
case ContentTypeIds.INT_TYPE_ID:
int intValue=reader.readInt();
if (save) {
editor.putInt(name,intValue);
}
return;
case ContentTypeIds.STRING_TYPE_ID:
String utfValue=reader.readUTF();
if (save) {
editor.putString(name,utfValue);
}
return;
}
}

private void readAndSetPreference ( String name , byte typeId , DataInputStream reader , Editor editor ) throws IOException { boolean save = true ; if ( doNotBackup . contains ( name ) ) { save = false ; } switch ( typeId ) { case ContentTypeIds . BOOLEAN_TYPE_ID : boolean booleanValue = reader . readBoolean ( ) ; if ( save ) { editor . putBoolean ( name , booleanValue ) ; } return ; case ContentTypeIds . LONG_TYPE_ID : long longValue = reader . readLong ( ) ; if ( save ) { editor . putLong ( name , longValue ) ; } return ; case ContentTypeIds . FLOAT_TYPE_ID : float floatValue = reader . readFloat ( ) ; if ( save ) { editor . putFloat ( name , floatValue ) ; } return ; case ContentTypeIds . INT_TYPE_ID : int intValue = reader . readInt ( ) ; if ( save ) { editor . putInt ( name , intValue ) ; } return ; case ContentTypeIds . STRING_TYPE_ID : String utfValue = reader . readUTF ( ) ; if ( save ) { editor . putString ( name , utfValue ) ; } return ; } }
reads a single preference and sets it into the given editor .
