martes, 27 de enero de 2009

Heroes 3era Temporada sub esp



Aca les dejo los links de descarga directa de la tercera temporada de Heroes, espero les guste.


3x01 The Second Coming
http://www.megaupload.com/?d=2G1SJDCH

3x02 The Butterfly Effect
http://www.megaupload.com/?d=ZFHS3PO0

3x03 One of Us, One of Them
http://www.megaupload.com/?d=T9YUMKEG

3x04 I Am Become Death
http://www.megaupload.com/?d=X5P3IZQE

3x05 Angels and Monsters
http://www.megaupload.com/?d=6I2WHGJU

3X06 ''Dying of the Light''
http://www.megaupload.com/?d=25TO94N6

3x7 ''Eris Quod Sum''
http://www.megaupload.com/?d=GEU4K0WU

3x8 "Villains"
http://www.megaupload.com/?d=RZ1J29N6

3x9 "It's Coming"
http://www.megaupload.com/?d=G26CEYMH

3x10 "The eclipse: part 1"
http://www.megaupload.com/?d=4STSQMWZ


3x11 The Eclipse : Parte 2
http://www.megaupload.com/?d=G26CEYMH



3x12 Our Father
http://www.megaupload.com/?d=KDLK1JNW


3x13 Duality (Fin de temporada)
http://www.megaupload.com/?d=2I9M1KYU

miércoles, 21 de enero de 2009

Java UNZIP

Aca les dejo un par de funciones java que permiten descomprimir un archivo ZIP por medio de código. Espero le sirvan ^_^

 private static void unzip(File f) throws IOException{
ZipFile zip;
zip = new ZipFile(f);
Enumeration e = zip.entries();
while( e.hasMoreElements() ) {
ZipEntry zen = (ZipEntry) e.nextElement();
if (zen.isDirectory()){
continue;
}
int size =(int) zen.getSize();
InputStream zis = zip.getInputStream(zen);
String extractfile = f.getParentFile().getAbsolutePath() + File.separator + zen.getName();

writeFile(zis, new File(extractfile),size);
zis.close();
}
zip.close();
}

/***
* Permite Escribir un archivo de un jar a disco
* @throws IOException
*/
private static void writeFile(InputStream zis, File file,int size) throws IOException {
File parentFile = file.getParentFile();
if(!parentFile.exists()){
parentFile.mkdirs();// this is important
}

FileOutputStream fos = null;
try {
fos = new FileOutputStream(file);
byte[] byteStream = new byte[ (int) size];
int buf = -1;
int rb = 0;
while ( ( ( (int) size - rb) > 0)) {
buf = zis.read(byteStream, rb, (int) size - rb);

if (buf == -1) {
break;
}
rb += buf;
}
fos.write(byteStream);
}
catch(IOException e) {
throw new IOException("UNZIP_ERROR");
}finally {
if(fos != null){
fos.close();
}
}
}


Nota: Este mismo código funciona para descomprimir JAR's lo unico que habria que cambiar es la "ZipFile" por "JarFile".