Skip to content

Commit

Permalink
Removed references to pdfbox (#416)
Browse files Browse the repository at this point in the history
Not currently used
  • Loading branch information
akbertram authored Oct 23, 2018
1 parent 25932e4 commit 4e7b43b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions packages/grDevices/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
<artifactId>renjin-gnur-runtime</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreesvg</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
package org.renjin.grDevices;

import org.apache.commons.vfs2.FileObject;
import org.apache.pdfbox.util.Charsets;
import org.jfree.graphics2d.svg.SVGGraphics2D;
import org.renjin.eval.EvalException;
import org.renjin.eval.Session;
Expand All @@ -34,6 +33,7 @@
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.StandardCharsets;

public class SvgContainer implements GDContainer {

Expand Down Expand Up @@ -123,7 +123,7 @@ public void flush() {
String filename = String.format(filenameFormat, pageNumber++);
FileObject fileObject = session.getFileSystemManager().resolveFile(filename);

try(Writer writer = new OutputStreamWriter(fileObject.getContent().getOutputStream(), Charsets.UTF_8)) {
try(Writer writer = new OutputStreamWriter(fileObject.getContent().getOutputStream(), StandardCharsets.UTF_8)) {
writer.write(svg);
}
} catch (IOException e) {
Expand All @@ -132,7 +132,7 @@ public void flush() {
}

private void flushCiObject(String svg) throws IOException {
String hashCode = Hashing.sha256().hashString(svg, Charsets.UTF_8).toString();
String hashCode = Hashing.sha256().hashString(svg, StandardCharsets.UTF_8).toString();

File plotDir = new File(RENJINCI_PLOT_DIR);
if(!plotDir.exists()) {
Expand All @@ -144,7 +144,7 @@ private void flushCiObject(String svg) throws IOException {

File plotFile = new File(plotDir, hashCode + ".svg");

Files.write(svg, plotFile, Charsets.UTF_8);
Files.write(svg, plotFile, StandardCharsets.UTF_8);

session.getStdOut().println("<<<<plot:" + hashCode + ".svg>>>>");
session.getStdOut().flush();
Expand Down

0 comments on commit 4e7b43b

Please sign in to comment.