public final class EolStreamTypeUtil
extends java.lang.Object
CoreConfig.EolStreamType
Modifier | Constructor and Description |
---|---|
private |
EolStreamTypeUtil() |
Modifier and Type | Method and Description |
---|---|
private static CoreConfig.EolStreamType |
checkInStreamType(WorkingTreeOptions options,
Attributes attrs) |
private static CoreConfig.EolStreamType |
checkOutStreamType(WorkingTreeOptions options,
Attributes attrs) |
static CoreConfig.EolStreamType |
detectStreamType(TreeWalk.OperationType op,
WorkingTreeOptions options,
Attributes attrs)
Convenience method used to detect if CRLF conversion has been configured
using the
global repo options
global attributes
info attributes
working tree .gitattributes
|
private static CoreConfig.EolStreamType |
getOutputFormat(WorkingTreeOptions options) |
static java.io.InputStream |
wrapInputStream(java.io.InputStream in,
CoreConfig.EolStreamType conversion)
Wrap the input stream depending on
CoreConfig.EolStreamType |
static java.io.OutputStream |
wrapOutputStream(java.io.OutputStream out,
CoreConfig.EolStreamType conversion)
Wrap the output stream depending on
CoreConfig.EolStreamType |
public static CoreConfig.EolStreamType detectStreamType(TreeWalk.OperationType op, WorkingTreeOptions options, Attributes attrs)
op
- is the
TreeWalk.OperationType
of
the current traversaloptions
- are the Config
options with key
WorkingTreeOptions.KEY
attrs
- are the Attributes
of the
file for which the
CoreConfig.EolStreamType
is to be
detectedCoreConfig.EolStreamType
to be
performed for the selected
TreeWalk.OperationType
public static java.io.InputStream wrapInputStream(java.io.InputStream in, CoreConfig.EolStreamType conversion)
CoreConfig.EolStreamType
in
- original streamconversion
- to be performedCoreConfig.EolStreamType
public static java.io.OutputStream wrapOutputStream(java.io.OutputStream out, CoreConfig.EolStreamType conversion)
CoreConfig.EolStreamType
out
- original streamconversion
- to be performedCoreConfig.EolStreamType
private static CoreConfig.EolStreamType checkInStreamType(WorkingTreeOptions options, Attributes attrs)
private static CoreConfig.EolStreamType getOutputFormat(WorkingTreeOptions options)
private static CoreConfig.EolStreamType checkOutStreamType(WorkingTreeOptions options, Attributes attrs)