This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public <T> T deserialize(String filename) { | |
InputStream is = getClass().getResourceAsStream(filename); | |
return (T) SerializationUtils.deserialize(is); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.io.File file = java.io.File.createTempFile("fail",".xml"); | |
System.out.println(file.getAbsolutePath()); | |
java.io.FileWriter fw = new java.io.FileWriter(file.getAbsoluteFile()); | |
java.io.BufferedWriter bw = new java.io.BufferedWriter(fw); | |
bw.write(xmlResponse); | |
bw.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
java.io.File file = java.io.File.createTempFile("filename",".ser"); | |
System.out.println(file.getAbsolutePath()); | |
java.io.OutputStream os = new java.io.FileOutputStream(file); | |
java.io.OutputStream buffer = new java.io.BufferedOutputStream(os); | |
java.io.ObjectOutput output = new java.io.ObjectOutputStream(buffer); | |
output.writeObject(messageContext); | |
output.close(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am pcollaog on github. | |
* I am pcollaog (https://keybase.io/pcollaog) on keybase. | |
* I have a public key whose fingerprint is 0386 FE77 6068 EA23 C9E8 CBE1 5DAC 8A0A E7A4 31BD | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void testsito() { | |
for (int i = 0; i < 100000; i++) { | |
String str1 = new String("hola"); | |
String str2 = new String("hola"); | |
boolean x = str1 == str2; | |
if (!x) { | |
System.out.println(x); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class JasperTest { | |
private AccountDAO dao = new DummyAccountDAO(); | |
@Test | |
public void jasperSpringUtilPOC() throws JRException, IOException { | |
InputStream reportInputStream = getClass().getResourceAsStream( | |
"/jasper/report1.jrxml"); | |
JasperDesign jasperDesign = JRXmlLoader.load(reportInputStream); | |
JasperReport report = JasperCompileManager.compileReport(jasperDesign); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object[] array = new Object[]{"12","23","34"}; | |
List list = Arrays.asList(array); |