Ignore:
Timestamp:
2014-05-09T14:36:55+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - Use of new Java 7 zip constructors allowing to specify a charset for entries names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/MirroredInputStream.java

    r7081 r7089  
    1515import java.net.MalformedURLException;
    1616import java.net.URL;
     17import java.nio.charset.StandardCharsets;
    1718import java.util.ArrayList;
    1819import java.util.Arrays;
     
    3940    /**
    4041     * Constructs an input stream from a given filename, URL or internal resource.
    41      * 
     42     *
    4243     * @param name can be:<ul>
    4344     *  <li>relative or absolute file name</li>
     
    5455    /**
    5556     * Constructs an input stream from a given filename, URL or internal resource.
    56      * 
     57     *
    5758     * @param name can be:<ul>
    5859     *  <li>relative or absolute file name</li>
     
    7071    /**
    7172     * Constructs an input stream from a given filename, URL or internal resource.
    72      * 
     73     *
    7374     * @param name can be:<ul>
    7475     *  <li>relative or absolute file name</li>
     
    8687    /**
    8788     * Constructs an input stream from a given filename, URL or internal resource.
    88      * 
     89     *
    8990     * @param name can be:<ul>
    9091     *  <li>relative or absolute file name</li>
     
    103104    /**
    104105     * Constructs an input stream from a given filename, URL or internal resource.
    105      * 
     106     *
    106107     * @param name can be:<ul>
    107108     *  <li>relative or absolute file name</li>
     
    121122    /**
    122123     * Constructs an input stream from a given filename, URL or internal resource.
    123      * 
     124     *
    124125     * @param name can be:<ul>
    125126     *  <li>relative or absolute file name</li>
     
    200201        Pair<String, InputStream> res = null;
    201202        try {
    202             ZipFile zipFile = new ZipFile(file);
     203            ZipFile zipFile = new ZipFile(file, StandardCharsets.UTF_8);
    203204            ZipEntry resentry = null;
    204205            Enumeration<? extends ZipEntry> entries = zipFile.entries();
     
    239240        cleanup(name, null);
    240241    }
    241    
     242
    242243    public static void cleanup(String name, String destDir) {
    243244        URL url;
     
    349350     * <p>
    350351     * This can causes problems when downloading from certain GitHub URLs.
    351      * 
     352     *
    352353     * @param downloadUrl The resource URL to download
    353354     * @param httpAccept The accepted MIME types sent in the HTTP Accept header. Can be {@code null}
Note: See TracChangeset for help on using the changeset viewer.