001/* 002 * Version 0.70 01/04/2002 003 * 004 * Visit my url for update: http://www.geocities.com/beapetrovicova/ 005 * 006 * jFtp was developed by Bea Petrovicova <beapetrovicova@yahoo.com>. 007 * The design and implementation of jFtp are available for royalty-free 008 * adoption and use. This software is provided 'as is' without any 009 * guarantees. Copyright is retained by Bea Petrovicova. Redistribution 010 * of any part of jFtp or any derivative works must include this notice. 011 * 012 */ 013package cz.dhl.io; 014 015import cz.dhl.ui.CoConsole; 016import java.io.InputStream; 017import java.io.IOException; 018import java.io.OutputStream; 019 020/** 021 * Defines interface to get input / 022 * output stream on CoFile objects. 023 * 024 * @Version 0.70 01/04/2002 025 * @author Bea Petrovicova <beapetrovicova@yahoo.com> 026 * @see CoFile 027 */ 028public interface CoOpen 029{ 030 /** Get type of data transfer. 031 * @return One of following optional values: 032 * 'A'=ASCII, 'I'=BINARY; */ 033 abstract public char getDataType(); 034 /** Returns an input stream for this file. */ 035 abstract public InputStream getInputStream() throws IOException; 036 /** Returns an output stream for this file. */ 037 abstract public OutputStream getOutputStream(boolean append) throws IOException; 038 /** Returns an output stream for this file. */ 039 abstract public OutputStream getOutputStream() throws IOException; 040 /** Creates a new file instance from this 041 * abstract pathname and a child string. */ 042 abstract public CoFile newFileChild(String child); 043 /** Creates a new file instance from a parent 044 * of this abstract pathname and a name string. */ 045 abstract public CoFile newFileRename(String name); 046 /** Gets console if implemented or null. */ 047 abstract public CoConsole getConsole(); 048}