ResXmlSerializer -> ExtMXSerializer

This commit is contained in:
Ryszard Wiśniewski 2010-03-25 21:00:41 +01:00
parent a9ab437ae0
commit d42798fd92
2 changed files with 6 additions and 5 deletions

View File

@ -22,6 +22,7 @@ import brut.androlib.res.data.*;
import brut.androlib.res.data.value.ResFileValue; import brut.androlib.res.data.value.ResFileValue;
import brut.androlib.res.data.value.ResXmlSerializable; import brut.androlib.res.data.value.ResXmlSerializable;
import brut.androlib.res.decoder.*; import brut.androlib.res.decoder.*;
import brut.androlib.res.util.ExtMXSerializer;
import brut.common.BrutException; import brut.common.BrutException;
import brut.directory.*; import brut.directory.*;
import brut.util.*; import brut.util.*;
@ -63,7 +64,7 @@ final public class AndrolibResources {
throw new AndrolibException(ex); throw new AndrolibException(ex);
} }
ResXmlSerializer xmlSerializer = getResXmlSerializer(); ExtMXSerializer xmlSerializer = getResXmlSerializer();
for (ResPackage pkg : resTable.listMainPackages()) { for (ResPackage pkg : resTable.listMainPackages()) {
attrDecoder.setCurrentPackage(pkg); attrDecoder.setCurrentPackage(pkg);
for (ResResource res : pkg.listFiles()) { for (ResResource res : pkg.listFiles()) {
@ -139,8 +140,8 @@ final public class AndrolibResources {
new ResFileDecoder(decoders), attrDecoder); new ResFileDecoder(decoders), attrDecoder);
} }
public ResXmlSerializer getResXmlSerializer() { public ExtMXSerializer getResXmlSerializer() {
ResXmlSerializer serial = new ResXmlSerializer(); ExtMXSerializer serial = new ExtMXSerializer();
serial.setProperty(serial.PROPERTY_SERIALIZER_INDENTATION, " "); serial.setProperty(serial.PROPERTY_SERIALIZER_INDENTATION, " ");
serial.setProperty(serial.PROPERTY_SERIALIZER_LINE_SEPARATOR, serial.setProperty(serial.PROPERTY_SERIALIZER_LINE_SEPARATOR,
System.getProperty("line.separator")); System.getProperty("line.separator"));

View File

@ -15,7 +15,7 @@
* under the License. * under the License.
*/ */
package brut.androlib.res.decoder; package brut.androlib.res.util;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
@ -24,7 +24,7 @@ import org.xmlpull.mxp1_serializer.MXSerializer;
/** /**
* @author Ryszard Wiśniewski <brut.alll@gmail.com> * @author Ryszard Wiśniewski <brut.alll@gmail.com>
*/ */
public class ResXmlSerializer extends MXSerializer { public class ExtMXSerializer extends MXSerializer {
@Override @Override
public void startDocument(String encoding, Boolean standalone) throws public void startDocument(String encoding, Boolean standalone) throws
IOException, IllegalArgumentException, IllegalStateException { IOException, IllegalArgumentException, IllegalStateException {