Novell exteNd Web Services SDK API

com.sssw.jbroker.web.portable
Interface OutputStream

All Known Subinterfaces:
ClientRequest, ServerResponse

public interface OutputStream

The XML RPC Output Stream. The output stream is used by marshalers to write data to the underlying XML buffer.


Method Summary
 Map _getProperties()
          Get stream properties
 InputStream createInputStream()
          Create input stream with the same data
 InputStream createInputStream(Reader reader, Map mimeParts)
          Create input stream with mime parts
 Reader createInputStreamReader()
          Create a standard java.io.Reader with the same data
 String getEncodingStyleURI()
          Get the current Encoding Style
 String getSchemaURI()
          Get the XML Schema URI
 boolean isDocument()
          Determine whether stream is document oriented
 String setEncodingStyleURI(String encodingStyleURI)
          Set the Encoding Style on the stream
 int size()
          Get the number of bytes written
 byte[] toByteArray()
          Get the contents of the stream as byte[].
 void writeAttachment(Object mimeObject, String nsuri, String name, String contentType)
          Write MIME attachment
 void writeBoolean(boolean b)
          Write a boolean
 void writeBoolean(boolean b, String name)
          Write a boolean with the given name
 void writeByte(byte b)
          Write a byte
 void writeByte(byte b, String name)
          Write a byte with the given name
 void writeChar(char c)
          Write a char.
 void writeChar(char c, String name)
          Write a char with the given name
 void writeContent(String text)
          Write content of the tag
 void writeDouble(double d)
          Write a double
 void writeDouble(double d, String name)
          Write a double with the given name
 void writeFloat(float f)
          Write a float
 void writeFloat(float f, String name)
          Write a float with the given name
 void writeInt(int i)
          Write an int
 void writeInt(int i, String name)
          Write an int with the given name
 void writeLong(long l)
          Write a long
 void writeLong(long l, String name)
          Write a long with the given name
 void writeObject(Object o)
          Write object with the default encoding style
 void writeObject(Object o, String name)
          Deprecated. as of jBrokerWeb 2.1
 void writeObject(Object o, String namespace, String localName)
          Write object for document-element
 void writeObject(Object o, String elNamespace, String elLocalName, String typeNamespace, String typeLocalName)
          Write object as XML
 void writeShort(short s)
          Write a short
 void writeShort(short s, String name)
          Write a short with the given name
 void writeTo(OutputStream os)
          Write the contents of the stream to given output stream.
 

Method Detail

writeContent

public void writeContent(String text)
                  throws IOException
Write content of the tag

Parameters:
text - the text to write to stream
Throws:
IOException - if an I/O exception occurred during write

writeByte

public void writeByte(byte b)
               throws IOException
Write a byte

Parameters:
b - the byte to write
Throws:
IOException - if an I/O exception occurred during write

writeByte

public void writeByte(byte b,
                      String name)
               throws IOException
Write a byte with the given name

Parameters:
b - the byte to write
name - name of byte parameter
Throws:
IOException - if an I/O exception occurred during write

writeChar

public void writeChar(char c)
               throws IOException
Write a char.

Parameters:
c - the char to write
Throws:
IOException - if an I/O exception occurred during write

writeChar

public void writeChar(char c,
                      String name)
               throws IOException
Write a char with the given name

Parameters:
c - the char to write
name - name of char parameter
Throws:
IOException - if an I/O exception occurred during write

writeBoolean

public void writeBoolean(boolean b)
                  throws IOException
Write a boolean

Parameters:
b - the boolean to write
Throws:
IOException - if an I/O exception occurred during write

writeBoolean

public void writeBoolean(boolean b,
                         String name)
                  throws IOException
Write a boolean with the given name

Parameters:
b - the boolean to write
name - name of boolean parameter
Throws:
IOException - if an I/O exception occurred during write

writeInt

public void writeInt(int i)
              throws IOException
Write an int

Parameters:
i - the int to write
Throws:
IOException - if an I/O exception occurred during write

writeInt

public void writeInt(int i,
                     String name)
              throws IOException
Write an int with the given name

Parameters:
i - the int to write
name - name of int parameter
Throws:
IOException - if an I/O exception occurred during write

writeShort

public void writeShort(short s)
                throws IOException
Write a short

Parameters:
s - the short to write
Throws:
IOException - if an I/O exception occurred during write

writeShort

public void writeShort(short s,
                       String name)
                throws IOException
Write a short with the given name

Parameters:
s - the short to write
name - name of short parameter
Throws:
IOException - if an I/O exception occurred during write

writeLong

public void writeLong(long l)
               throws IOException
Write a long

Parameters:
l - the long to write
Throws:
IOException - if an I/O exception occurred during write

writeLong

public void writeLong(long l,
                      String name)
               throws IOException
Write a long with the given name

Parameters:
l - the long to write
name - name of long parameter
Throws:
IOException - if an I/O exception occurred during write

writeFloat

public void writeFloat(float f)
                throws IOException
Write a float

Parameters:
f - the float to write
Throws:
IOException - if an I/O exception occurred during write

writeFloat

public void writeFloat(float f,
                       String name)
                throws IOException
Write a float with the given name

Parameters:
f - the float to write
name - name of float parameter
Throws:
IOException - if an I/O exception occurred during write

writeDouble

public void writeDouble(double d)
                 throws IOException
Write a double

Parameters:
d - the double to write
Throws:
IOException - if an I/O exception occurred during write

writeDouble

public void writeDouble(double d,
                        String name)
                 throws IOException
Write a double with the given name

Parameters:
d - the double to write
name - name of double parameter
Throws:
IOException - if an I/O exception occurred during write

writeTo

public void writeTo(OutputStream os)
             throws IOException
Write the contents of the stream to given output stream.

Parameters:
os - the output stream to write to
Throws:
IOException - if an I/O exception occurred during write

toByteArray

public byte[] toByteArray()
                   throws IOException
Get the contents of the stream as byte[].

Returns:
byte[] content of the stream.
Throws:
IOException - if an I/O exception occurred

writeObject

public void writeObject(Object o)
                 throws IOException
Write object with the default encoding style

Parameters:
o - the object to write
Throws:
IOException - if an I/O exception occurred during write

writeObject

public void writeObject(Object o,
                        String name)
                 throws IOException
Deprecated. as of jBrokerWeb 2.1

Write object with the default encoding style

Parameters:
o - the object to write
name - name of object parameter
Throws:
IOException - if an I/O exception occurred during write

writeObject

public void writeObject(Object o,
                        String namespace,
                        String localName)
                 throws IOException
Write object for document-element

Parameters:
o - the object to write
namespace - namespace of object parameter
localName - local name of object parameter
Throws:
IOException - if an I/O exception occurred during write

writeObject

public void writeObject(Object o,
                        String elNamespace,
                        String elLocalName,
                        String typeNamespace,
                        String typeLocalName)
                 throws IOException
Write object as XML

Parameters:
o - the object to write
elNamespace - namespace of the element to write
elLocalName - local name of the element to write
typeNamespace - namespace of object's xml type
typeLocalName - local name of object's xml type
Throws:
IOException - if an I/O exception occurred during write

setEncodingStyleURI

public String setEncodingStyleURI(String encodingStyleURI)
Set the Encoding Style on the stream

Parameters:
encodingStyleURI - the new Encoding Style to use
Returns:
previous Encoding Style

getEncodingStyleURI

public String getEncodingStyleURI()
Get the current Encoding Style

Returns:
current Encoding Style

getSchemaURI

public String getSchemaURI()
Get the XML Schema URI

Returns:
XML Schema URI string

size

public int size()
         throws IOException
Get the number of bytes written

Returns:
total number of bytes written to stream
Throws:
IOException - if an I/O exception occurred during write

isDocument

public boolean isDocument()
Determine whether stream is document oriented

Returns:
TRUE if document oriented, FALSE otherwise

createInputStream

public InputStream createInputStream()
                              throws IOException
Create input stream with the same data

Returns:
a portable input stream with the output stream's data
Throws:
IOException - if an I/O exception occurred during conversion

createInputStream

public InputStream createInputStream(Reader reader,
                                     Map mimeParts)
                              throws IOException
Create input stream with mime parts

Parameters:
reader - reader of the root soap message
mimeParts - Map of readers for every mime part
Returns:
a portable input stream with the output stream's data
Throws:
IOException - if an I/O exception occurred during conversion

createInputStreamReader

public Reader createInputStreamReader()
                               throws IOException
Create a standard java.io.Reader with the same data

Returns:
a reader with the output stream's data
Throws:
IOException - if an I/O exception occurred during conversion

writeAttachment

public void writeAttachment(Object mimeObject,
                            String nsuri,
                            String name,
                            String contentType)
                     throws IOException
Write MIME attachment

Parameters:
mimeObject - MIME attachment object
nsuri - namespace uri of the element
name - local name of the element
contentType - content-type of the MIME
Throws:
IOException - if an I/O exception while writing

_getProperties

public Map _getProperties()
Get stream properties

Returns:
a Map with stream properties

Novell exteNd Web Services SDK API

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2003 Novell, Inc. All Rights Reserved.