removed 2 sun-libraries
git-svn-id: https://svn.libreccm.org/ccm/trunk@3586 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
1858a37bae
commit
82013214d9
|
|
@ -22,11 +22,12 @@ import com.arsdigita.util.Assert;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import sun.net.www.protocol.http.HttpURLConnection;
|
//import sun.net.www.protocol.http.HttpURLConnection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HttpHTMLProvider
|
* HttpHTMLProvider
|
||||||
|
|
@ -64,10 +65,8 @@ class HttpHTMLProvider
|
||||||
|
|
||||||
// setup local request password for possible use in validating
|
// setup local request password for possible use in validating
|
||||||
// request
|
// request
|
||||||
|
HttpURLConnection con = (HttpURLConnection) url.openConnection();
|
||||||
HttpURLConnection con = new HttpURLConnection(url, url.getHost(), url.getPort());
|
con.setRequestMethod("GET");
|
||||||
//HttpURLConnection con = (HttpURLConnection) url.openConnection();
|
|
||||||
//con.setRequestMethod("GET");
|
|
||||||
|
|
||||||
// set passwords (cookies) on request if required (allows increased
|
// set passwords (cookies) on request if required (allows increased
|
||||||
// security)
|
// security)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import com.arsdigita.london.importer.DomainObjectMapper;
|
||||||
|
|
||||||
import com.arsdigita.cms.BinaryAsset;
|
import com.arsdigita.cms.BinaryAsset;
|
||||||
import com.arsdigita.cms.CMS;
|
import com.arsdigita.cms.CMS;
|
||||||
import com.arsdigita.cms.ContentBundle;
|
|
||||||
import com.arsdigita.cms.ContentItem;
|
import com.arsdigita.cms.ContentItem;
|
||||||
import com.arsdigita.cms.ContentType;
|
import com.arsdigita.cms.ContentType;
|
||||||
import com.arsdigita.domain.DomainObject;
|
import com.arsdigita.domain.DomainObject;
|
||||||
|
|
@ -37,9 +36,11 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Stack;
|
import java.util.Stack;
|
||||||
|
import org.apache.commons.codec.DecoderException;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.xml.sax.Attributes;
|
import org.xml.sax.Attributes;
|
||||||
import sun.misc.BASE64Decoder;
|
//import sun.misc.BASE64Decoder;
|
||||||
|
import org.apache.commons.codec.binary.Base64;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Core importer class, handling the <cms:item> XML subblock.
|
* Core importer class, handling the <cms:item> XML subblock.
|
||||||
|
|
@ -646,16 +647,11 @@ public class ItemParser extends DomainObjectParser {
|
||||||
if (atts != null && atts.get(ENCODING_ATTR) != null) {
|
if (atts != null && atts.get(ENCODING_ATTR) != null) {
|
||||||
String encoding = (String) atts.get(ENCODING_ATTR);
|
String encoding = (String) atts.get(ENCODING_ATTR);
|
||||||
if (ENCODING_BASE64.equals(encoding)) {
|
if (ENCODING_BASE64.equals(encoding)) {
|
||||||
BASE64Decoder decoder = new BASE64Decoder();
|
byte[] content = Base64.decodeBase64(value.getBytes());
|
||||||
try {
|
|
||||||
byte[] content = decoder.decodeBuffer(value);
|
|
||||||
dobj.put(key, content);
|
dobj.put(key, content);
|
||||||
debugLog("Successfully loaded base64 encoded BLOB"
|
debugLog("Successfully loaded base64 encoded BLOB"
|
||||||
+ ", length: " + content.length + " bytes");
|
+ ", length: " + content.length + " bytes");
|
||||||
return;
|
return;
|
||||||
} catch (IOException ioe) {
|
|
||||||
throw new UncheckedWrapperException(ioe);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
s_log.error("Don't know how to handle encoding: " + encoding);
|
s_log.error("Don't know how to handle encoding: " + encoding);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue