summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils
diff options
context:
space:
mode:
authorBianca Schnalzer <bianca.schnalzer@egiz.gv.at>2017-08-23 14:33:46 +0200
committerBianca Schnalzer <bianca.schnalzer@egiz.gv.at>2017-08-23 14:33:46 +0200
commit0e59a64b983d7d6872794887d1d8dec51b4c8cd6 (patch)
treec82e4e73d14fc1bcec7a26453c0e8b1a957eb514 /pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils
parent69cec3514fd58f1ca044a689a3540d4b4724fb3a (diff)
downloadpdf-over-0e59a64b983d7d6872794887d1d8dec51b4c8cd6.tar.gz
pdf-over-0e59a64b983d7d6872794887d1d8dec51b4c8cd6.tar.bz2
pdf-over-0e59a64b983d7d6872794887d1d8dec51b4c8cd6.zip
Internet Connection Tracking
Diffstat (limited to 'pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
index 955097fc..f6c1eb29 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/utils/CertificateDownloadSource.java
@@ -60,14 +60,7 @@ public class CertificateDownloadSource {
URL url = new URL(Constants.CERTIFICATE_DOWNLOAD_XML_URL+Constants.CERTIFICATE_XML_FILE);
URLConnection connection = url.openConnection();
InputStream is = connection.getInputStream();
-
- int b = is.read();
- if (b==-1)
- {
- log.info("Cannot read file");
- }
- else
- {
+
BufferedInputStream bis = new BufferedInputStream(is);
FileOutputStream fis2 = new FileOutputStream(new File(Constants.RES_CERT_LIST_ADDED));
@@ -80,7 +73,7 @@ public class CertificateDownloadSource {
fis2.close();
bis.close();
downloadCertificatesFromServer();
- }
+
} catch (IOException e) {
log.debug("File not found");}
@@ -110,9 +103,7 @@ public class CertificateDownloadSource {
Node certificates_added = doc_added.getFirstChild();
NodeList certificates_added_list = certificates_added.getChildNodes();
-
- if (doc_added.hasChildNodes())
- {
+
//identify the certificate that has to be downloaded
for (int i = 0; i < certificates_added_list.getLength(); i++) {
try {
@@ -152,7 +143,9 @@ public class CertificateDownloadSource {
}
}
- }}
+ }
+
+
} catch (IOException e) {
e.printStackTrace();