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 CodingErrorActionprivate static CodingErrorActionprivate static final Charset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckNewLines(File file) private static voidcheckWrappedException(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 voidcopy(InputStream src, OutputStream dst) static voidcopyAndTranslate(File source, File destination, String charset, byte[] eol, Map<String, byte[]> keywords, boolean special, boolean expand, boolean repair) static FiledetranslateWorkingCopy(SVNAdminArea dir, String name, SVNProperties propDiff, boolean force) static byte[]getBaseEOL(String eolStyle) static StringgetCharset(String charset, String mimeType, Object path, ISVNOptions options) static byte[]getEOL(String eolStyle, ISVNOptions options) private static StringgetGlobalCharset(ISVNOptions options, String mimeType) static CodingErrorActionstatic CodingErrorActionstatic FilegetTranslatedFile(SVNAdminArea dir, String name, File src, boolean forceEOLRepair, boolean useGlobalTmp, boolean forceCopy, boolean toNormalFormat) static InputStreamgetTranslatedStream(SVNAdminArea adminArea, String name, boolean translateToNormalForm, boolean repairEOL) static InputStreamgetTranslatingInputStream(InputStream in, String charset, byte[] eol, boolean repair, Map<String, byte[]> keywords, boolean expand) static OutputStreamgetTranslatingOutputStream(OutputStream out, String charset, byte[] eol, boolean repair, Map<String, byte[]> keywords, boolean expand) static FilemaybeUpdateTargetEOLs(SVNAdminArea dir, File target, SVNProperties propDiff) static voidsetEncoderActions(CodingErrorAction onMalformedInput, CodingErrorAction onUnmappableCharacter) static voidtranslate(File src, File dst, String charset, byte[] eol, Map<String, byte[]> keywords, boolean special, boolean expand) static voidtranslate(SVNAdminArea adminArea, String name, File src, File dst, boolean expand) static voidtranslate(SVNAdminArea adminArea, String name, File src, File dst, boolean safelyEncode, boolean expand) static voidtranslate(SVNAdminArea adminArea, String name, File src, File dst, String customEOLStyle, boolean expand) static voidtranslate(SVNAdminArea adminArea, String name, File src, File dst, String customEOLStyle, boolean safelyEncode, boolean expand) static voidtranslate(SVNAdminArea adminArea, String name, String srcPath, String dstPath, boolean expand) static voidtranslate(SVNAdminArea adminArea, String name, String srcPath, String dstPath, boolean safelyEncode, boolean expand) static voidtranslate(SVNAdminArea adminArea, String name, String srcPath, String dstPath, String customEOLStyle, boolean expand) static StringtranslateString(String str, byte[] eol, Map<String, byte[]> keywords, boolean repair, boolean expand) private static voidtranslateToNormalForm(File source, File destination, String charset, String eolStyle, boolean alwaysRepairEOLs, String keywords, boolean isSpecial) static voidtranslationError(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)
-