public InputStream openInputFile(String fileName) throws IOException { checkFileName(fileName); return getLocalIO().openInputFile(fileName); }
/** * Deletes the entry specified by the {@code name} parameter. * * @param fileName the storage-dependent name * @throws IOException if the specified name is invalid, * or an internal entry cannot be deleted */ public boolean deleteFile(String fileName) throws IOException { checkFileName(fileName); return getLocalIO().deleteFile(fileName); }
public OutputStream openOutputFile(String fileName) throws IOException { checkFileName(fileName); return getLocalIO().openOutputFile(fileName); }
public boolean deleteFile(String fileName) throws IOException { checkFileName(fileName); return getLocalIO().deleteFile(fileName); }
/** * Opens an input stream to read from the entry * specified by the {@code name} parameter. * If the named entry cannot be opened for reading * then a {@code IOException} is thrown. * * @param fileName the storage-dependent name * @return an {@code InputStream} object * @throws IOException if the specified name is invalid, * or an input stream cannot be opened */ public InputStream openInputFile(String fileName) throws IOException { checkFileName(fileName); return getLocalIO().openInputFile(fileName); }
/** * Opens an output stream to write to the entry * specified by the {@code name} parameter. * If the named entry cannot be opened for writing * then a {@code IOException} is thrown. * If the named entry does not exist it can be created. * You can decide whether data will be appended via append parameter. * * @param fileName the storage-dependent name * @param append if <code>true</code>, then bytes will be written * to the end of the output entry rather than the beginning * @return an {@code OutputStream} object * @throws IOException if the specified name is invalid, * or an output stream cannot be opened */ public OutputStream openOutputFile(String fileName, boolean append) throws IOException { checkFileName(fileName); return getLocalIO().openOutputFile(fileName, append); }