java.lang.Object
org.cryptomator.frontend.fuse.FileNameTranscoder
Class to transcode filenames and path components from one encoding to another.
Instances created with transcoder() default to fuse and nio UTF-8 encoding with NFC normalization. To change encoding and normalization, use the supplied "withXXX()" methods. If an encoding is not part of the UTF famlily, the normalization is ignored.
-
Method Summary
Modifier and TypeMethodDescriptionTranscodes the given FUSE file name to NIO representation.interpretAsFuseString(String fuseFileName) Interprets the given string as FUSE character set encoded and returns the original byte sequence.interpretAsNioString(String nioFileName) Interprets the given string as NIO character set encoded and returns the original byte sequence.Transcodes the given NIO file name to FUSE representation.static FileNameTranscoderwithFuseCharset(Charset fuseCharset) withFuseNormalization(Normalizer.Form fuseNormalization) withNioCharset(Charset nioCharset) withNioNormalization(Normalizer.Form nioNormalization)
-
Method Details
-
nioToFuse
-
fuseToNio
-
interpretAsFuseString
Interprets the given string as FUSE character set encoded and returns the original byte sequence.- Parameters:
fuseFileName- string from the fuse layer- Returns:
- A byte sequence with the original encoding of the input
-
interpretAsNioString
Interprets the given string as NIO character set encoded and returns the original byte sequence.- Parameters:
nioFileName- string from the nio layer- Returns:
- A byte sequence with the original encoding of the input
-
withFuseCharset
-
withNioCharset
-
withFuseNormalization
-
withNioNormalization
-
transcoder
-