
org.xmind.core.io.IOutputTarget Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xmindjbehaveplugin Show documentation
Show all versions of xmindjbehaveplugin Show documentation
Plugin that manages JBehave stories storage in XMind mindmap file, which allows design jBehave tests right after the brainstorm
The newest version!
/* ******************************************************************************
* Copyright (c) 2006-2012 XMind Ltd. and others.
*
* This file is a part of XMind 3. XMind releases 3 and
* above are dual-licensed under the Eclipse Public License (EPL),
* which is available at http://www.eclipse.org/legal/epl-v10.html
* and the GNU Lesser General Public License (LGPL),
* which is available at http://www.gnu.org/licenses/lgpl.html
* See http://www.xmind.net/license.html for details.
*
* Contributors:
* XMind Ltd. - initial API and implementation
*******************************************************************************/
package org.xmind.core.io;
import java.io.IOException;
import java.io.OutputStream;
/**
* An output target provides abilities to write multi-entry data into specific
* resources.
*
* @author Frank Shaka
*/
public interface IOutputTarget {
/**
* Determines whether an entry with the specified name is available or not.
*
* @param entryName
* the name of the desired entry
* @return true
if the entry is available, or
* false
otherwise
*/
boolean isEntryAvaialble(String entryName);
/**
* Opens a new output stream to receive data for the specified entry. The
* stream should be closed by clients when data writing finishes.
*
*
* For diagnostic purpose, this method is not recommended any more.
* Use {@link #openEntryStream(String)} instead to let potential I/O errors
* be thrown.
*
*
* @param entryName
* the name of the entry
* @return an output stream for the specified entry, or null
if
* the specified entry is not available
*/
OutputStream getEntryStream(String entryName);
/**
* Opens a new output stream to receive data for the specified entry. The
* stream should be closed by clients when data writing finishes.
*
* @param entryName
* the name of the entry
* @return an output stream for the specified entry (never null
* )
* @throws java.io.IOException
* if I/O error occurs
*/
OutputStream openEntryStream(String entryName) throws IOException;
/**
* Sets the modification time of the specific entry.
*
*
* Note that this method should be called before
* getEntryStream()
, otherwise it may have no effect.
*
*
* @param time
* the new modification time to set
*/
void setEntryTime(String entryName, long time);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy