at.spardat.xma.serializer.XmaInput Maven / Gradle / Ivy
The newest version!
/*******************************************************************************
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH .
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* s IT Solutions AT Spardat GmbH - initial API and implementation
*******************************************************************************/
//@(#) $Id: XmaInput.java 2089 2007-11-28 13:56:13Z s3460 $
package at.spardat.xma.serializer;
import java.io.IOException;
/**
* Provides for extracting primitive Java types from a destination
* media that has been written before using the XmaOutput
* interface.
*
* @author YSD, 11.02.2005
*/
public interface XmaInput {
/**
* Reads a String
*
* @return String never null
*/
public String readString () throws IOException;
/**
* Reads a String
*
* @return String that may be null
*/
public String readStringN () throws IOException;
/**
* Reads an int
*
* @return int read
*/
public int readInt () throws IOException;
/**
* Reads a long
*
* @return the read long
*/
public long readLong () throws IOException;
/**
* Reads a short
*
* @return short read
*/
public short readShort () throws IOException;
/**
* Reads a boolean
*
* @return the boolean read
*/
public boolean readBoolean () throws IOException;
/**
* Reads a byte
*
* @return the byte read
*/
public byte readByte () throws IOException;
/**
* Reads a sequence of bytes that has been written with writeSerializedBytes.
* The result can be deserialized using the same kind of Deserializer as the
* one that provides this XmaInput.
*/
public byte[] readSerializedBytes () throws IOException;
/**
* Reads an object written with XmaOutput.writeObject
*
* @return non-null object
*/
public Object readObject() throws ClassNotFoundException, IOException;
}