@Override public Object call(final Object iArgument) { return OIOUtils.getStringContent(iArgument); } });
@Override public boolean equals(final Object o) { if (o == null || !(o instanceof OBuffer)) return false; return OIOUtils.equals(buffer, ((OBuffer) o).buffer); }
@Override public String getNameFromPath(String dbPath) { return OIOUtils.getRelativePathIfAny(dbPath, null); }
public static String getDirectory(String iPath) { iPath = getPath(iPath); int pos = iPath.lastIndexOf("/"); if (pos == -1) return ""; return iPath.substring(0, pos); }
public static final void copyDirectory(final File source, final File destination) throws IOException { if (!destination.exists()) destination.mkdirs(); for (File f : source.listFiles()) { final File target = new File(destination.getAbsolutePath() + "/" + f.getName()); if (f.isFile()) copyFile(f, target); else copyDirectory(f, target); } }
public boolean ready() { try { return current < end || input.ready(); } catch (IOException e) { throw new OIOException("Error in ready", e); } }
public static String getStringMaxLength(final String iText, final int iMax) { return getStringMaxLength(iText, iMax, ""); }
public static boolean delete(File file) throws IOException { if (!file.exists()) return true; if (useOldFileAPI) return file.delete(); return OFileUtilsJava7.delete(file); }
public static String readStreamAsString(final InputStream iStream) throws IOException { return readStreamAsString(iStream, StandardCharsets.UTF_8); }
@Override public void readBuffer(ByteBuffer buffer) throws IOException { OIOUtils.readByteBuffer(buffer, channel); }
public static Object encode(final Object iValue) { return OIOUtils.encode(iValue); }
private void writeBuffer(final ByteBuffer buffer, final long offset) throws IOException { buffer.rewind(); writeByteBuffer(buffer, channel, offset); }
public OrientBaseGraph(final String url, final String username, final String password) { this.pool = null; this.url = OFileUtils.getPath(url); this.username = username; this.password = password; this.openOrCreate(); readDatabaseConfiguration(); }
public static String getStringMaxLength(final String iText, final int iMax) { return getStringMaxLength(iText, iMax, ""); }
public static boolean delete(File file) throws IOException { if (!file.exists()) return true; if (useOldFileAPI) return file.delete(); return OFileUtilsJava7.delete(file); } }
@Override public Object call(final Object iArgument) { return OIOUtils.getStringContent(iArgument); } });
@Override public String getNameFromPath(String dbPath) { return OIOUtils.getRelativePathIfAny(dbPath, null); }
private ByteBuffer readData(final long iOffset, final int iSize) throws IOException { final ByteBuffer buffer = ByteBuffer.allocate(iSize); readByteBuffer(buffer, channel, iOffset, true); buffer.rewind(); return buffer; }
public OrientBaseGraph(final String url, final String username, final String password) { this.url = OFileUtils.getPath(url); this.username = username; this.password = password; this.openOrCreate(); config(); }
/** * Use OIOUtils.getStringContent(iValue) instead. * * @param iValue * * @return */ @Deprecated public static String getStringContent(final Object iValue) { // MOVED return OIOUtils.getStringContent(iValue); }