Ignore:
Timestamp:
2023-10-12T21:13:32+02:00 (12 months ago)
Author:
taylor.smock
Message:

Fix #23157: Change S57osm.OSMmap to accept either a file or inputstream (patch by oobayly)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/seachart/jrenderpgsql/src/jrenderpgsql/JrenderPgsql.java

    r35110 r36169  
    77import java.awt.geom.Point2D;
    88import java.awt.image.BufferedImage;
    9 import java.io.BufferedReader;
     9import java.io.ByteArrayInputStream;
    1010import java.io.StringReader;
    1111import java.io.ByteArrayOutputStream;
    1212import java.io.FileOutputStream;
     13import java.nio.charset.StandardCharsets;
    1314import java.util.ArrayList;
    1415import java.util.HashMap;
     
    396397        // library where it will be parsed again.
    397398
    398         BufferedReader in = new BufferedReader(new StringReader(combinedBuf.toString()));
     399        ByteArrayInputStream in = new ByteArrayInputStream(combinedBuf.toString().getBytes(StandardCharsets.UTF_8));
    399400        map = new S57map(true);
    400401        S57osm.OSMmap(in, map, false);
     
    427428            public RuleSet ruleset() {
    428429                return RuleSet.SEAMARK;
     430            }
     431
     432            public Chart chart() {
     433              return null;
     434            }
     435
     436            public int grid() {
     437              return 0;
    429438            }
    430439        };
Note: See TracChangeset for help on using the changeset viewer.