public class CoreIOUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CoreIOUtils.CachedURL |
| Modifier and Type | Field and Description |
|---|---|
static String |
MIME_TYPE_SHA1 |
static String |
newLineString |
| Constructor and Description |
|---|
CoreIOUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
Arrays_equals(byte[] a,
int aFromIndex,
int aToIndex,
byte[] b,
int bFromIndex,
int bToIndex) |
static Set<CopyOption> |
asCopyOptions(Set<net.thevpc.nuts.io.NPathOption> noptions) |
static String |
betterPath(String path1) |
static BufferedReader |
bufferedReaderOf(byte[] bytes) |
static String |
buildUrl(String url,
String path) |
static String |
concatPath(String... all) |
static Stream<String> |
confLines(InputStream stream) |
static Stream<String> |
confLines(Reader stream) |
static OutputStream |
convertOutputStream(OutputStream out,
net.thevpc.nuts.io.NTerminalMode expected,
net.thevpc.nuts.spi.NSystemTerminalBase term)
Deprecated.
|
static ExtendedFormatAware |
convertOutputStreamToExtendedFormatAware(OutputStream out,
net.thevpc.nuts.io.NTerminalMode expected,
net.thevpc.nuts.spi.NSystemTerminalBase term)
Deprecated.
|
static InputStream |
createBytesStream(byte[] bytes,
net.thevpc.nuts.util.NMsg message,
String contentType,
String encoding,
String kind) |
static net.thevpc.nuts.io.NContentMetadata |
createContentMetadata(Object... any) |
static net.thevpc.nuts.io.DefaultNContentMetadata |
defaultNutsInputSourceMetadata(InputStream is) |
static String |
ensureLeadingSlash(String s) |
static InputStream |
getCachedUrlWithSHA1(String path,
String sourceTypeName,
boolean ignoreSha1NotFound) |
static String |
getNewLine() |
static boolean |
isFileProtocol(String s) |
static boolean |
isHttpUrl(String s) |
static boolean |
isObsoleteInstant(Instant instant) |
static boolean |
isObsoletePath(net.thevpc.nuts.io.NPath path) |
static boolean |
isObsoletePath(Path path) |
static boolean |
isValidConfLine(String line) |
static Stream<String> |
lines(InputStream stream) |
static Stream<String> |
lines(Reader reader) |
static byte[] |
loadFileContentLenient(Path out) |
static String |
longestCommonParent(String path1,
String path2) |
static String |
metadataToString(net.thevpc.nuts.io.NContentMetadata md,
Object caller) |
static net.thevpc.nuts.util.NOptional<InputStream> |
openStream(URL u) |
static String |
replaceFilePrefix(String path,
String prefix,
String replacement) |
static String |
replaceFilePrefixes(String path,
Map<String,String> map) |
static File |
resolveLocalFileFromResource(Class cls,
String url) |
static File |
resolveLocalFileFromURL(URL url) |
static Path |
resolveLocalPathFromURL(URL url) |
static net.thevpc.nuts.io.NPrintStream |
resolveOut() |
static String |
resolveRepositoryPath(net.thevpc.nuts.NAddRepositoryOptions options,
Path rootFolder) |
static URL |
resolveURLFromResource(Class cls,
String urlPath) |
static net.thevpc.nuts.util.NStream<String> |
safeLines(byte[] bytes) |
static Path |
toPathInputSource(net.thevpc.nuts.io.NInputSource is,
List<Path> tempPaths,
boolean enforceExtension) |
static PrintWriter |
toPrintWriter(OutputStream writer,
net.thevpc.nuts.spi.NSystemTerminalBase term)
Deprecated.
|
static PrintWriter |
toPrintWriter(Writer writer,
net.thevpc.nuts.spi.NSystemTerminalBase term)
Deprecated.
|
static PathInfo.Status |
tryWrite(byte[] content,
net.thevpc.nuts.io.NPath out,
DoWhenExist doWhenExist,
DoWhenNotExists doWhenNotExist,
String rememberMeKey) |
static PathInfo.Status |
tryWrite(byte[] content,
net.thevpc.nuts.io.NPath out,
String rememberMeKey) |
static PathInfo.Status |
tryWriteStatus(byte[] content,
net.thevpc.nuts.io.NPath out,
String rememberMeKey) |
static String |
urlEncodeString(String s) |
static URL |
urlOf(String any) |
static net.thevpc.nuts.io.NExecOutput |
validateErr(net.thevpc.nuts.io.NExecOutput err) |
static net.thevpc.nuts.io.NExecInput |
validateIn(net.thevpc.nuts.io.NExecInput in) |
static net.thevpc.nuts.io.NExecOutput |
validateOut(net.thevpc.nuts.io.NExecOutput out) |
public static final String MIME_TYPE_SHA1
public static String newLineString
@Deprecated public static PrintWriter toPrintWriter(Writer writer, net.thevpc.nuts.spi.NSystemTerminalBase term)
public static boolean isValidConfLine(String line)
public static Stream<String> confLines(InputStream stream)
public static Stream<String> lines(InputStream stream)
@Deprecated public static PrintWriter toPrintWriter(OutputStream writer, net.thevpc.nuts.spi.NSystemTerminalBase term)
@Deprecated public static OutputStream convertOutputStream(OutputStream out, net.thevpc.nuts.io.NTerminalMode expected, net.thevpc.nuts.spi.NSystemTerminalBase term)
@Deprecated public static ExtendedFormatAware convertOutputStreamToExtendedFormatAware(OutputStream out, net.thevpc.nuts.io.NTerminalMode expected, net.thevpc.nuts.spi.NSystemTerminalBase term)
public static String resolveRepositoryPath(net.thevpc.nuts.NAddRepositoryOptions options, Path rootFolder)
public static net.thevpc.nuts.io.NPrintStream resolveOut()
public static InputStream getCachedUrlWithSHA1(String path, String sourceTypeName, boolean ignoreSha1NotFound)
public static Path toPathInputSource(net.thevpc.nuts.io.NInputSource is, List<Path> tempPaths, boolean enforceExtension)
public static String getNewLine()
public static boolean isObsoletePath(Path path)
public static boolean isObsoletePath(net.thevpc.nuts.io.NPath path)
public static boolean isObsoleteInstant(Instant instant)
public static byte[] loadFileContentLenient(Path out)
public static boolean Arrays_equals(byte[] a,
int aFromIndex,
int aToIndex,
byte[] b,
int bFromIndex,
int bToIndex)
public static InputStream createBytesStream(byte[] bytes, net.thevpc.nuts.util.NMsg message, String contentType, String encoding, String kind)
public static String replaceFilePrefix(String path, String prefix, String replacement)
public static PathInfo.Status tryWriteStatus(byte[] content, net.thevpc.nuts.io.NPath out, String rememberMeKey)
public static PathInfo.Status tryWrite(byte[] content, net.thevpc.nuts.io.NPath out, String rememberMeKey)
public static PathInfo.Status tryWrite(byte[] content, net.thevpc.nuts.io.NPath out, DoWhenExist doWhenExist, DoWhenNotExists doWhenNotExist, String rememberMeKey)
public static Set<CopyOption> asCopyOptions(Set<net.thevpc.nuts.io.NPathOption> noptions)
public static net.thevpc.nuts.util.NStream<String> safeLines(byte[] bytes)
public static BufferedReader bufferedReaderOf(byte[] bytes)
public static net.thevpc.nuts.io.NExecOutput validateErr(net.thevpc.nuts.io.NExecOutput err)
public static net.thevpc.nuts.util.NOptional<InputStream> openStream(URL u)
public static net.thevpc.nuts.io.DefaultNContentMetadata defaultNutsInputSourceMetadata(InputStream is)
public static net.thevpc.nuts.io.NExecInput validateIn(net.thevpc.nuts.io.NExecInput in)
public static net.thevpc.nuts.io.NExecOutput validateOut(net.thevpc.nuts.io.NExecOutput out)
public static String metadataToString(net.thevpc.nuts.io.NContentMetadata md, Object caller)
public static net.thevpc.nuts.io.NContentMetadata createContentMetadata(Object... any)
public static boolean isHttpUrl(String s)
public static boolean isFileProtocol(String s)
Copyright © 2025 vpc open source initiative. All rights reserved.