Word
Use Java to convert Word to HTML or txt. Some time ago for this problem headache, and then looked at the data finally resolved, the program is released for later reference.
//-------------------------------------------------------Copyright (C) wave Group Commercial Systems Co., ltd All rights reservedFile name: wordtohtml file version: 1.00.00Author: Guo author e-mail:guozhu@langchao.comC
The project type of Java is set by a project file, which differs under different editor items.Under Eclipse is the. project file under IntelliJ, which is the project name. iml file,If you have just introduced the project in the editing of which there is no such file, it is your project is not approved by the editor of the project, a way to modify the format of the editor approved, generally through the import method will automatically add these files.
In Java, we often need to do some conversion to list, array, etc., of course there are many kinds of conversion methods, but which method is both convenient and efficient? Let me introduce you to the best conversion method between sets.convert 1.List to arraylist2.Array Conversion to Liststring[] countries = {"China", "Switzerland", "Italy", "France"}; List List = arrays.aslist (countries);3.Map Conversion to Listlist4.Array conversion to setString []
word| Program | Convert Jacob is a COM bridge under Java and Windows, through which we can invoke COM components in Java programs. If your JDK is 1.4, then you need to download Jacob1.9 's JNI library to work properly, and earlier versions have some problems with JDK1.4.
Package com; /***〈p〉title:word Document Turn HTML Cla
Method One: Object.ToString ()Obj.tostring ()Note: you must ensure that object is not a null value, otherwise the NullPointerException exception will be thrown . Method Two: (String) ObjectNew Integer (n= (String) o;Note: The type that needs to be converted must be able to be converted to string , otherwise a calsscastexception exception error occurs. Method Three:string.valueof (Object)When you use String.valueof (object) , it determines whether the object is a null value, and if so, returns NU
//Chinese converted to Unicode code value String str = "Too many people to buy, please try again later!" ";Char[]archar=str.tochararray ();intivalue=0; String ustr= ""; for(int I=0;ilength; i++) {
ivalue= (
int
) Str.charat (i);
if (ivalueustr+="\\" +integer. tohexstring (ivalue); }Else{ustr+="\\u" +integer. tohexstring (ivalue); }}//UnicodeCode Valueconvert into ChineseString str ="Too many people to buy, please try again later!" ";Char[]archar=str.tochararray ();inti
Today found that the data summarized in the database is a bit large, one output is automatically converted into scientific counting method. It was later found that there was a problem with the method of converting strings. As follows:
String a = "11234567.89";
BigDecimal db = new BigDecimal (a);
SYSTEM.OUT.PRINTLN ("Science counts:" + db.tostring ());
System.out.println ("Ordinary count:" + db.toplainstring ());
Output:
Scientific Count: 1.123456789E7
General Count: 11234567.89
The
Thumbnail | Transform use Java to convert large picture files into small thumbnail files, requiring the use of JDK1.4,
You can change this program code to JavaBean for use in a Web environment.
The converted small thumbnail effect is good!
Import Javax.imageio.ImageIO;
Import javax.imageio.IIOException;
Import Java.awt.image.BufferedImage;
Import Java.awt.Image;
Import Java.io.File;
Import java.awt.image.A
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.