package org.eden.swt; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.zip.ZipFile; public class Skin { private String fSkinLocation; private boolean fSkinLocationIsZip; //private transient //remove the first doubleslash on this line and the error happends. private Skin() { //intentionally left blank } public static Skin makeSkin(String pSkinLocation) throws IOException { Skin lNew = new Skin(); File lFile; lNew.fSkinLocation = pSkinLocation; lFile = new File(lNew.fSkinLocation); if ( !lFile.exists() ) { throw new FileNotFoundException( "Skin '" + pSkinLocation + "' not found."); } lNew.fSkinLocationIsZip = !lFile.isDirectory(); return lNew; } public static void setTempDirectory(String pTemp) { sTempDirectory = pTemp; } private InputStream getResource(String pResourceName) throws IOException { if ( fSkinLocationIsZip ) { return getResourceFromZip(pResourceName); } else { return getResourceFromDir(pResourceName); } } private InputStream getResourceFromZip(String pResourceName) throws IOException { ZipFile lZipFile; lZipFile = new ZipFile(fSkinLocation); } }