Java Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Java Examples

Quick Start
Unicode
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
SFTP
Signatures
SMTP
Socket / SSL
Spider
SSH
SSH Key
SSH Tunnel
Tar
Upload
XML
XMP
Zip

More Examples...
Email Object
FileAccess
RSS
Atom
String
Byte Array
Self-Extractor
Service
PPMD
Deflate
DH Key Exchange
DSA

Unreleased...
Bzip2
LZW
Icon

 

 

 

 

 

 

 

Save Web Page as MHT Web Archive

Java source code example to save a web page to a .mht archive.

Download Java Programming Examples

// Chilkat Java Example Program:
// Download a web page and save as a .mht web archive.
	
import com.chilkatsoft.CkMht;

public class WebPageToMht {
	
  static {
    try {
        System.loadLibrary("chilkat");
    } catch (UnsatisfiedLinkError e) {
      System.err.println("Native code library failed to load.\n" + e);
      System.exit(1);
    }
  }

  public static void main(String argv[]) 
  {
    // Create a MHT object...
    CkMht mht = new CkMht();
    mht.UnlockComponent("anything for 30-day trial");
    
    boolean success = mht.GetAndSaveMHT("http://www.steve.com","output/steve.mht");
    if (!success)
    {
    	mht.SaveLastError("lastError.txt");	
    }
    
  }
}





 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2008 Chilkat Software, Inc. All Rights Reserved.