Package com.orientechnologies.common.io
Class OIOUtils
java.lang.Object
com.orientechnologies.common.io.OIOUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateBlockSize(Path path) static voidcopyStream(InputStream in, OutputStream out) static Objectstatic StringencodeJsonString(String iInput) static booleanequals(byte[] buffer, byte[] buffer2) static StringgetPathFromDatabaseName(String iPath) static StringgetRelativePathIfAny(String iDatabaseURL, String iBasePath) static StringgetStringContent(Object iValue) static longgetTimeAsMillisecs(Object iSize) static StringgetTimeAsString(long iTime) static DategetTodayWithTime(String iTime) static StringgetUnixFileName(String iFileName) Returns the Unix file name format converting backslashes (\) to slasles (/)static booleanstatic booleanstatic booleanstatic booleanisStringContent(Object iValue) static Stringjava2unicode(String iInput) static voidreadByteBuffer(ByteBuffer buffer, FileChannel channel) static voidreadByteBuffer(ByteBuffer buffer, FileChannel channel, long position, boolean throwOnEof) static StringreadFileAsString(File iFile) static StringreadFileAsString(File iFile, Charset iCharset) static voidreadFully(InputStream in, byte[] b, int off, int len) static StringreadStreamAsString(InputStream iStream) static StringreadStreamAsString(InputStream iStream, Charset iCharset) static StringwrapStringContent(Object iValue, char iStringDelimiter) static intwriteByteBuffer(ByteBuffer buffer, FileChannel channel, long position) static void
-
Field Details
-
SECOND
public static final long SECOND- See Also:
-
MINUTE
public static final long MINUTE- See Also:
-
HOUR
public static final long HOUR- See Also:
-
DAY
public static final long DAY- See Also:
-
YEAR
public static final long YEAR- See Also:
-
WEEK
public static final long WEEK- See Also:
-
UTF8_BOM
- See Also:
-
-
Constructor Details
-
OIOUtils
public OIOUtils()
-
-
Method Details
-
getTimeAsMillisecs
-
getTimeAsString
-
getTodayWithTime
- Throws:
ParseException
-
readFileAsString
- Throws:
IOException
-
readFileAsString
- Throws:
IOException
-
readStreamAsString
- Throws:
IOException
-
readStreamAsString
- Throws:
IOException
-
writeFile
- Throws:
IOException
-
copyStream
- Throws:
IOException
-
getUnixFileName
Returns the Unix file name format converting backslashes (\) to slasles (/) -
getRelativePathIfAny
-
getPathFromDatabaseName
-
encode
-
java2unicode
-
encodeJsonString
-
isStringContent
-
getStringContent
-
wrapStringContent
-
equals
public static boolean equals(byte[] buffer, byte[] buffer2) -
isLong
-
readFully
- Throws:
IOException
-
readByteBuffer
public static void readByteBuffer(ByteBuffer buffer, FileChannel channel, long position, boolean throwOnEof) throws IOException - Throws:
IOException
-
readByteBuffer
- Throws:
IOException
-
writeByteBuffer
public static int writeByteBuffer(ByteBuffer buffer, FileChannel channel, long position) throws IOException - Throws:
IOException
-
isOsWindows
public static boolean isOsWindows() -
isOsLinux
public static boolean isOsLinux() -
calculateBlockSize
-