Package com.ettrema.httpclient

Examples of com.ettrema.httpclient.Resource.href()


            return;
        }

        if( toDelete.size() == 1 ) {
            Resource r = toDelete.get( 0 );
            int result = JOptionPane.showConfirmDialog( component, "Are you sure you want to delete: " + r.href() + "?" );
            if( result == JOptionPane.YES_OPTION ) {
                try {
                    r.delete();
                } catch( Exception ex ) {
                    ex.printStackTrace();
View Full Code Here


                  throw new RuntimeException( ex );
              }
          } else {
              File f = (File) r;
              if( ( f.contentType != null && f.contentType.equals( "text/html" ) ) || f.name.endsWith( "html" ) ) {
                  BareBonesBrowserLaunch.openURL( r.href() );
              } else if( ( f.contentType != null && f.contentType.contains( "image" ) ) || f.name.endsWith( "jpg" ) ) {
                  BareBonesBrowserLaunch.openURL( r.href() );
              } else if( f.contentType != null && f.contentType.contains( "text" ) ) {
                  openTextEditor( f );
              } else {
View Full Code Here

          } else {
              File f = (File) r;
              if( ( f.contentType != null && f.contentType.equals( "text/html" ) ) || f.name.endsWith( "html" ) ) {
                  BareBonesBrowserLaunch.openURL( r.href() );
              } else if( ( f.contentType != null && f.contentType.contains( "image" ) ) || f.name.endsWith( "jpg" ) ) {
                  BareBonesBrowserLaunch.openURL( r.href() );
              } else if( f.contentType != null && f.contentType.contains( "text" ) ) {
                  openTextEditor( f );
              } else {
                  java.io.File dest = new java.io.File( "/home/brad/Desktop" ); // TODO
                  java.io.File rFile;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.