資源簡介
基于ueditor的word自動轉存功能實現,目前只測試過IE8,只在提供ie8瀏覽器轉存思路,如需要支持其他瀏覽器,請根據各自情況修改。
ueditor版本1.4.2
使用參考博客地址。
需要mvn安裝ueditor1.1.0.jar,壓縮包里有jar和簡單示例,僅供參考,命令不能直接使用,可以下載官網的在打入jar包。
https://mp.csdn.net/postedit/88902965
代碼片段和文件信息
/*
Licensed?to?the?Apache?Software?Foundation?(ASF)?under?one
or?more?contributor?license?agreements.??See?the?NOTICE?file
distributed?with?this?work?for?additional?information
regarding?copyright?ownership.??The?ASF?licenses?this?file
to?you?under?the?Apache?License?Version?2.0?(the
“License“);?you?may?not?use?this?file?except?in?compliance
with?the?License.??You?may?obtain?a?copy?of?the?License?at
??https://www.apache.org/licenses/LICENSE-2.0
Unless?required?by?applicable?law?or?agreed?to?in?writing
software?distributed?under?the?License?is?distributed?on?an
“AS?IS“?BASIS?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY
KIND?either?express?or?implied.??See?the?License?for?the
specific?language?governing?permissions?and?limitations
under?the?License.
*/
import?java.io.File;
import?java.io.FileInputStream;
import?java.io.FileOutputStream;
import?java.io.IOException;
import?java.net.URL;
import?java.nio.channels.Channels;
import?java.nio.channels.ReadableByteChannel;
import?java.util.Properties;
public?class?MavenWrapperDownloader?{
????/**
?????*?Default?URL?to?download?the?maven-wrapper.jar?from?if?no?‘downloadUrl‘?is?provided.
?????*/
????private?static?final?String?DEFAULT_DOWNLOAD_URL?=
????????????“https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar“;
????/**
?????*?Path?to?the?maven-wrapper.properties?file?which?might?contain?a?downloadUrl?property?to
?????*?use?instead?of?the?default?one.
?????*/
????private?static?final?String?MAVEN_WRAPPER_PROPERTIES_PATH?=
????????????“.mvn/wrapper/maven-wrapper.properties“;
????/**
?????*?Path?where?the?maven-wrapper.jar?will?be?saved?to.
?????*/
????private?static?final?String?MAVEN_WRAPPER_JAR_PATH?=
????????????“.mvn/wrapper/maven-wrapper.jar“;
????/**
?????*?Name?of?the?property?which?should?be?used?to?override?the?default?download?url?for?the?wrapper.
?????*/
????private?static?final?String?PROPERTY_NAME_WRAPPER_URL?=?“wrapperUrl“;
????public?static?void?main(String?args[])?{
????????System.out.println(“-?Downloader?started“);
????????File?baseDirectory?=?new?File(args[0]);
????????System.out.println(“-?Using?base?directory:?“?+?baseDirectory.getAbsolutePath());
????????//?If?the?maven-wrapper.properties?exists?read?it?and?check?if?it?contains?a?custom
????????//?wrapperUrl?parameter.
????????File?mavenWrapperPropertyFile?=?new?File(baseDirectory?MAVEN_WRAPPER_PROPERTIES_PATH);
????????String?url?=?DEFAULT_DOWNLOAD_URL;
????????if?(mavenWrapperPropertyFile.exists())?{
????????????FileInputStream?mavenWrapperPropertyFileInputStream?=?null;
????????????try?{
????????????????mavenWrapperPropertyFileInputStream?=?new?FileInputStream(mavenWrapperPropertyFile);
????????????????Properties?mavenWrapperProperties?=?new?Properties();
????????????????mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
????????????????url?=?mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL?url);
????????????}?catch?(IOException?e)?{
????????????????Syst
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????175??2019-05-20?00:00??mvn-install.txt
?????文件???????30110??2014-05-16?14:14??ueditor-1.1.0.jar
?????目錄???????????0??2019-05-19?23:29??ueditor\
?????目錄???????????0??2019-05-19?23:41??ueditor\.git\
?????文件???????????3??2019-05-19?23:35??ueditor\.git\COMMIT_EDITMSG
?????文件??????????23??2019-04-01?10:45??ueditor\.git\HEAD
?????文件??????????41??2019-04-01?10:46??ueditor\.git\ORIG_HEAD
?????文件?????????378??2019-04-01?10:45??ueditor\.git\config
?????文件??????????73??2019-03-31?21:25??ueditor\.git\desc
?????目錄???????????0??2019-03-31?21:25??ueditor\.git\hooks\
?????文件?????????478??2019-03-31?21:25??ueditor\.git\hooks\applypatch-msg.sample
?????文件?????????896??2019-03-31?21:25??ueditor\.git\hooks\commit-msg.sample
?????文件????????3327??2019-03-31?21:25??ueditor\.git\hooks\fsmonitor-watchman.sample
?????文件?????????189??2019-03-31?21:25??ueditor\.git\hooks\post-update.sample
?????文件?????????424??2019-03-31?21:25??ueditor\.git\hooks\pre-applypatch.sample
?????文件????????1638??2019-03-31?21:25??ueditor\.git\hooks\pre-commit.sample
?????文件????????1348??2019-03-31?21:25??ueditor\.git\hooks\pre-push.sample
?????文件????????4898??2019-03-31?21:25??ueditor\.git\hooks\pre-reba
?????文件?????????544??2019-03-31?21:25??ueditor\.git\hooks\pre-receive.sample
?????文件????????1492??2019-03-31?21:25??ueditor\.git\hooks\prepare-commit-msg.sample
?????文件????????3610??2019-03-31?21:25??ueditor\.git\hooks\update.sample
?????文件???????40374??2019-05-19?23:40??ueditor\.git\index
?????目錄???????????0??2019-03-31?21:25??ueditor\.git\info\
?????文件?????????240??2019-03-31?21:25??ueditor\.git\info\exclude
?????目錄???????????0??2019-03-31?21:25??ueditor\.git\logs\
?????文件????????1429??2019-05-19?23:35??ueditor\.git\logs\HEAD
?????目錄???????????0??2019-03-31?21:27??ueditor\.git\logs\refs\
?????目錄???????????0??2019-04-01?10:45??ueditor\.git\logs\refs\heads\
?????文件?????????165??2019-04-01?10:45??ueditor\.git\logs\refs\heads\dev-boot
?????文件????????1091??2019-05-19?23:35??ueditor\.git\logs\refs\heads\master
?????目錄???????????0??2019-03-31?21:27??ueditor\.git\logs\refs\remotes\
............此處省略1605個文件信息
評論
共有 條評論