Class SVNTranslator
java.lang.Object
org.tmatesoft.svn.core.internal.wc.admin.SVNTranslator
- Version:
- 1.3
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static CodingErrorAction
private static CodingErrorAction
private static final Charset
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
checkNewLines
(File file) private static void
checkWrappedException
(IOException ioe, File file) computeKeywords
(String keywords, String locationUrl, String repositoryRoot, String a, String d, String r, ISVNOptions options) private static byte[]
convertEOL
(byte[] eol, Charset from, Charset to) static void
copy
(InputStream src, OutputStream dst) static void
copyAndTranslate
(File source, File destination, String charset, byte[] eol, Map<String, byte[]> keywords, boolean special, boolean expand, boolean repair) static File
detranslateWorkingCopy
(SVNAdminArea dir, String name, SVNProperties propDiff, boolean force) static byte[]
getBaseEOL
(String eolStyle) static String
getCharset
(String charset, String mimeType, Object path, ISVNOptions options) static byte[]
getEOL
(String eolStyle, ISVNOptions options) private static String
getGlobalCharset
(ISVNOptions options, String mimeType) static CodingErrorAction
static CodingErrorAction
static File
getTranslatedFile
(SVNAdminArea dir, String name, File src, boolean forceEOLRepair, boolean useGlobalTmp, boolean forceCopy, boolean toNormalFormat) static InputStream
getTranslatedStream
(SVNAdminArea adminArea, String name, boolean translateToNormalForm, boolean repairEOL) static InputStream
getTranslatingInputStream
(InputStream in, String charset, byte[] eol, boolean repair, Map<String, byte[]> keywords, boolean expand) static OutputStream
getTranslatingOutputStream
(OutputStream out, String charset, byte[] eol, boolean repair, Map<String, byte[]> keywords, boolean expand) static File
maybeUpdateTargetEOLs
(SVNAdminArea dir, File target, SVNProperties propDiff) static void
setEncoderActions
(CodingErrorAction onMalformedInput, CodingErrorAction onUnmappableCharacter) static void
translate
(File src, File dst, String charset, byte[] eol, Map<String, byte[]> keywords, boolean special, boolean expand) static void
translate
(SVNAdminArea adminArea, String name, File src, File dst, boolean expand) static void
translate
(SVNAdminArea adminArea, String name, File src, File dst, boolean safelyEncode, boolean expand) static void
translate
(SVNAdminArea adminArea, String name, File src, File dst, String customEOLStyle, boolean expand) static void
translate
(SVNAdminArea adminArea, String name, File src, File dst, String customEOLStyle, boolean safelyEncode, boolean expand) static void
translate
(SVNAdminArea adminArea, String name, String srcPath, String dstPath, boolean expand) static void
translate
(SVNAdminArea adminArea, String name, String srcPath, String dstPath, boolean safelyEncode, boolean expand) static void
translate
(SVNAdminArea adminArea, String name, String srcPath, String dstPath, String customEOLStyle, boolean expand) static String
translateString
(String str, byte[] eol, Map<String, byte[]> keywords, boolean repair, boolean expand) private static void
translateToNormalForm
(File source, File destination, String charset, String eolStyle, boolean alwaysRepairEOLs, String keywords, boolean isSpecial) static void
translationError
(File path, IOException e)
-
Field Details
-
UTF8_CHARSET
-
onMalformedInputAction
-
onUnmappableCharacterAction
-
-
Constructor Details
-
SVNTranslator
public SVNTranslator()
-
-
Method Details
-
translateString
public static String translateString(String str, byte[] eol, Map<String, byte[]> keywords, boolean repair, boolean expand) throws SVNException- Throws:
SVNException
-
translate
public static void translate(SVNAdminArea adminArea, String name, String srcPath, String dstPath, boolean expand) throws SVNException - Throws:
SVNException
-
translate
public static void translate(SVNAdminArea adminArea, String name, String srcPath, String dstPath, boolean safelyEncode, boolean expand) throws SVNException - Throws:
SVNException
-
translate
public static void translate(SVNAdminArea adminArea, String name, String srcPath, String dstPath, String customEOLStyle, boolean expand) throws SVNException - Throws:
SVNException
-
translate
public static void translate(SVNAdminArea adminArea, String name, File src, File dst, boolean expand) throws SVNException - Throws:
SVNException
-
translate
public static void translate(SVNAdminArea adminArea, String name, File src, File dst, boolean safelyEncode, boolean expand) throws SVNException - Throws:
SVNException
-
translate
public static void translate(SVNAdminArea adminArea, String name, File src, File dst, String customEOLStyle, boolean expand) throws SVNException - Throws:
SVNException
-
translate
public static void translate(SVNAdminArea adminArea, String name, File src, File dst, String customEOLStyle, boolean safelyEncode, boolean expand) throws SVNException - Throws:
SVNException
-
translate
public static void translate(File src, File dst, String charset, byte[] eol, Map<String, byte[]> keywords, boolean special, boolean expand) throws SVNException- Throws:
SVNException
-
getTranslatedStream
public static InputStream getTranslatedStream(SVNAdminArea adminArea, String name, boolean translateToNormalForm, boolean repairEOL) throws SVNException - Throws:
SVNException
-
getTranslatedFile
public static File getTranslatedFile(SVNAdminArea dir, String name, File src, boolean forceEOLRepair, boolean useGlobalTmp, boolean forceCopy, boolean toNormalFormat) throws SVNException - Throws:
SVNException
-
maybeUpdateTargetEOLs
public static File maybeUpdateTargetEOLs(SVNAdminArea dir, File target, SVNProperties propDiff) throws SVNException - Throws:
SVNException
-
detranslateWorkingCopy
public static File detranslateWorkingCopy(SVNAdminArea dir, String name, SVNProperties propDiff, boolean force) throws SVNException - Throws:
SVNException
-
translateToNormalForm
private static void translateToNormalForm(File source, File destination, String charset, String eolStyle, boolean alwaysRepairEOLs, String keywords, boolean isSpecial) throws SVNException - Throws:
SVNException
-
copyAndTranslate
public static void copyAndTranslate(File source, File destination, String charset, byte[] eol, Map<String, byte[]> keywords, boolean special, boolean expand, boolean repair) throws SVNException- Throws:
SVNException
-
checkWrappedException
- Throws:
SVNException
-
checkNewLines
-
copy
- Throws:
IOException
-
getTranslatingOutputStream
public static OutputStream getTranslatingOutputStream(OutputStream out, String charset, byte[] eol, boolean repair, Map<String, byte[]> keywords, boolean expand) -
getTranslatingInputStream
public static InputStream getTranslatingInputStream(InputStream in, String charset, byte[] eol, boolean repair, Map<String, byte[]> keywords, boolean expand) -
convertEOL
-
computeKeywords
-
getEOL
-
getBaseEOL
-
getCharset
public static String getCharset(String charset, String mimeType, Object path, ISVNOptions options) throws SVNException - Throws:
SVNException
-
getGlobalCharset
-
translationError
- Throws:
SVNException
-
getOnMalformedInputAction
-
getOnUnmappableCharacterAction
-
setEncoderActions
public static void setEncoderActions(CodingErrorAction onMalformedInput, CodingErrorAction onUnmappableCharacter)
-