Package com.flansmod.common.types

Examples of com.flansmod.common.types.TypeFile


          {
            try
            {
              BufferedReader reader = new BufferedReader(new FileReader(file));
              String[] splitName = file.getName().split("/");
              TypeFile typeFile = new TypeFile(typeToCheckFor, splitName[splitName.length - 1].split("\\.")[0]);
              for(;;)
              {
                String line = null;
                try
                {
                  line = reader.readLine();
                }
                catch (Exception e)
                {
                  break;
                }
                if (line == null)
                  break;
                typeFile.lines.add(line);
              }
              reader.close();
            }
            catch(FileNotFoundException e)
            {
              e.printStackTrace();
            }
            catch(IOException e)
            {
              e.printStackTrace();
            }
          }   
        }
      }
      else
      {
        try
        {
          ZipFile zip = new ZipFile(contentPack);
          ZipInputStream zipStream = new ZipInputStream(new FileInputStream(contentPack));
          BufferedReader reader = new BufferedReader(new InputStreamReader(zipStream));
          ZipEntry zipEntry = zipStream.getNextEntry();
          do
          {
            zipEntry = zipStream.getNextEntry();
            if(zipEntry == null)
              continue;
            TypeFile typeFile = null;
            for(EnumType type : EnumType.values())
            {
              if(zipEntry.getName().startsWith(type.folderName + "/") && zipEntry.getName().split(type.folderName + "/").length > 1 && zipEntry.getName().split(type.folderName + "/")[1].length() > 0)
              {
                String[] splitName = zipEntry.getName().split("/");
                typeFile = new TypeFile(type, splitName[splitName.length - 1].split("\\.")[0]);
              }
            }
            if(typeFile == null)
            {
              continue;
View Full Code Here


  public ItemStack legs;
  public ItemStack shoes;
 
  public Team(String s, String s1, int teamCol, char textCol)
  {
    super(new TypeFile(EnumType.team, s, false));
    shortName = s;
    name = s1;
    teamColour = teamCol;
    textColour = textCol;
    teams.add(this);
View Full Code Here

TOP

Related Classes of com.flansmod.common.types.TypeFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.