Package se.llbit.chunky.launcher.VersionInfo

Examples of se.llbit.chunky.launcher.VersionInfo.LibraryStatus


    }

    tableModel = new DefaultTableModel(version.libraries.size(), 3);
    int i = 0;
    for (Library lib: version.libraries) {
      LibraryStatus libStatus = lib.testIntegrity(libDir);
      if (libStatus != LibraryStatus.PASSED && libStatus != LibraryStatus.INCOMPLETE_INFO) {
        neededLibraries.add(lib);
        downloadBytes += lib.size;
      }
View Full Code Here


      URL url = new URL(theUrl);
      ReadableByteChannel inChannel = Channels.newChannel(url.openStream());
      FileOutputStream out = new FileOutputStream(lib.getFile(libDir));
      out.getChannel().transferFrom(inChannel, 0, Long.MAX_VALUE);
      out.close();
      LibraryStatus status = lib.testIntegrity(libDir);
      if (status == LibraryStatus.PASSED) {
        return DownloadStatus.SUCCESS;
      } else {
        return DownloadStatus.DOWNLOAD_FAILED;
      }
View Full Code Here

  static class StatusCellRenderer extends DefaultTableCellRenderer {
    @Override
    protected void setValue(Object value) {
      if (value instanceof LibraryStatus) {
        LibraryStatus status = (LibraryStatus) value;
        setText(status.downloadStatus());
        if (status == LibraryStatus.PASSED || status == LibraryStatus.DOWNLOADED_OK) {
          setIcon(Icons.cached);
        } else {
          switch (status) {
          case MD5_MISMATCH:
View Full Code Here

      versionsDir.mkdirs();
    }
    Collection<VersionInfo.Library> neededLibraries =
        new LinkedList<VersionInfo.Library>();
    for (Library lib: version.libraries) {
      LibraryStatus libStatus = lib.testIntegrity(libDir);
      if (libStatus != LibraryStatus.PASSED && libStatus != LibraryStatus.INCOMPLETE_INFO) {
        neededLibraries.add(lib);

        // pretty print library size
        float size = lib.size;
View Full Code Here

TOP

Related Classes of se.llbit.chunky.launcher.VersionInfo.LibraryStatus

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.