问题
Is there a way that I can exclude particular string (II*)
while encode a tiff
file and keep that String
as it is and also during the decode ?
Or
How can I specify the encoding to always encode (II*)
as three characters and not to combine with any other characters ?
Below code to replace the string II* with ( II* ), however tiff got corrupted after that.
Path path = Paths.get("D:\\Users\\Vinoth\\workspace\\Testing\\Testing.tiff");
Charset charset = StandardCharsets.UTF_8;
String content = new String(Files.readAllBytes(path), charset);
content = content.replace("II*", " II ");
content = content.replace(" II "," II* ");
Files.write(path, content.getBytes(charset));
来源:https://stackoverflow.com/questions/38431971/in-java-exclude-a-string-while-encode-using-base64