Files
Brainstorm/Common/src/com/common/io/IStandardOutputStream.java
2014-05-30 10:31:51 -07:00

40 lines
2.1 KiB
Java

/*
* Copyright (c) 1999,2005 Declarative Engineering LLC.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Declarative Engineering LLC
* verson 1 which accompanies this distribution, and is available at
* http://declarativeengineering.com/legal/DE_Developer_License_v1.txt
*/
package com.common.io;
import java.io.IOException;
public interface IStandardOutputStream extends IObjectStream, IOutputStream, java.io.DataOutput {
/**
* Gets the number style used by default when serializing numbers.
* @return The number style identifier used by default.
*/
public int getDefaultNumberStyle();
/**
* Writes a fixed length string to file and pads it with spaces where necessary.
* @param string The string to write. This string must be under the byte size limit and an IOException will result from an improperly sized string.
* @param length The fixed number of bytes in the string.
* @exception IOException If an I/O error occurs. In particular, an <code>IOException</code> may be thrown if the output stream has been closed.
*/
public void writeFixedLengthString(String string, int length) throws java.io.IOException;
/**
* Writes a UTF16 string to the stream.
* A UTF16 string is a fixed character size string using 2 bytes for each character.
* <p>WARNING: The user must call readUTF16(String) in the input stream for this method to work properly. The user cannot mix and match string serialization methods.
* @param string The string to write to the stream.
*/
public void writeUTF16(String string) throws IOException;
/**
* Writes a UTF8 string to the stream.
* A UTF8 string is a variable character size string using 1..N bytes for each character. All ASCII characters will use 1 byte, but most european characters will use 2 and some oriental characters will use 3 bytes.
* <p>WARNING: The user must call readUTF8(String) in the input stream for this method to work properly. The user cannot mix and match string serialization methods.
* @param string The string to write to the stream.
*/
public void writeUTF8(String string) throws IOException;
}//IObjectOutputStream//