mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 15:50:45 +00:00
small refactorings
This commit is contained in:
@@ -50,6 +50,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
||||
/**
|
||||
* Class with helper method
|
||||
@@ -797,7 +798,7 @@ public class Helper {
|
||||
public static String getDecompilationSkippedComment() {
|
||||
return "// " + AppResources.translate("decompilation.skipped");
|
||||
}
|
||||
|
||||
|
||||
public static void appendTimeoutComment(GraphTextWriter writer, int timeout) {
|
||||
writer.appendNoHilight("/*").newLine();
|
||||
writer.appendNoHilight(" * ").appendNoHilight(AppResources.translate("decompilationError")).newLine();
|
||||
@@ -863,6 +864,10 @@ public class Helper {
|
||||
return area;
|
||||
}
|
||||
|
||||
public static String byteArrayToBase64String(byte[] data) {
|
||||
return DatatypeConverter.printBase64Binary(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats double value (removes .0 from end)
|
||||
*
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.jpexs.helpers;
|
||||
|
||||
import com.jpexs.decompiler.flash.helpers.ImageHelper;
|
||||
import java.awt.AlphaComposite;
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
@@ -30,7 +31,6 @@ import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.Hashtable;
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
/**
|
||||
*
|
||||
@@ -144,13 +144,13 @@ public class SerializableImage implements Serializable {
|
||||
|
||||
private void writeObject(ObjectOutputStream out) throws IOException {
|
||||
try {
|
||||
ImageIO.write(image, "png", out);
|
||||
ImageHelper.write(image, "png", out);
|
||||
} catch (Exception ex) {
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
|
||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||
image = ImageIO.read(in);
|
||||
image = ImageHelper.read(in);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user