94 // * to a text, this method is responsible for decoding base64 and
95 // * producing a {@link DataHandler} with "application/octet-stream"
96 // * as the content type.
97 // *
98 // * @return
99 // * always non-null valid object.
100 // * Invocations of this method may return the same object as long
101 // * as the {@link XMLStreamReader#next()} method is not used,
102 // * but otherwise {@link DataSource} object returned from this method
103 // * is considered to be owned by the client, and therefore it shouldn't
104 // * be reused by the implementation of this method.
105 // *
106 // * <p>
107 // * The returned {@link DataSource} is read-only, and the caller
108 // * must not invoke {@link DataSource#getOutputStream()}.
109 // *
110 // * @throws IllegalStateException
111 // * if the parser is not pointing at characters infoset item.
112 // * @throws XMLStreamException
113 // * if the parser points to text but text is not base64-encoded text,
114 // * or if some other parsing error occurs (such as if the <xop:Include>
115 // * points to a non-existing attachment.)
116 // *
117 // * <p>
118 // * It is also OK for this method to return successfully, only to fail
119 // * during an {@link InputStream} is read from {@link DataSource}.
120 // */
121 //DataSource getTextAsDataHandler() throws XMLStreamException;
122
123 ///**
124 // * Works like {@link XMLStreamReader#getText()}
125 // * but returns text as {@link byte[]}.
126 // *
127 // * <p>
128 // * The contract of this method is mostly the same as
129 // * {@link #getTextAsDataHandler()}, except that this
130 // * method returns the binary datas as an exact-size byte[].
131 // *
132 // * <p>
133 // * This method is also not capable of reporting the content type
134 // * of this binary data, even if it is available to the parser.
|
94 // * to a text, this method is responsible for decoding base64 and
95 // * producing a {@link DataHandler} with "application/octet-stream"
96 // * as the content type.
97 // *
98 // * @return
99 // * always non-null valid object.
100 // * Invocations of this method may return the same object as long
101 // * as the {@link XMLStreamReader#next()} method is not used,
102 // * but otherwise {@link DataSource} object returned from this method
103 // * is considered to be owned by the client, and therefore it shouldn't
104 // * be reused by the implementation of this method.
105 // *
106 // * <p>
107 // * The returned {@link DataSource} is read-only, and the caller
108 // * must not invoke {@link DataSource#getOutputStream()}.
109 // *
110 // * @throws IllegalStateException
111 // * if the parser is not pointing at characters infoset item.
112 // * @throws XMLStreamException
113 // * if the parser points to text but text is not base64-encoded text,
114 // * or if some other parsing error occurs (such as if the {@code <xop:Include>}
115 // * points to a non-existing attachment.)
116 // *
117 // * <p>
118 // * It is also OK for this method to return successfully, only to fail
119 // * during an {@link InputStream} is read from {@link DataSource}.
120 // */
121 //DataSource getTextAsDataHandler() throws XMLStreamException;
122
123 ///**
124 // * Works like {@link XMLStreamReader#getText()}
125 // * but returns text as {@link byte[]}.
126 // *
127 // * <p>
128 // * The contract of this method is mostly the same as
129 // * {@link #getTextAsDataHandler()}, except that this
130 // * method returns the binary datas as an exact-size byte[].
131 // *
132 // * <p>
133 // * This method is also not capable of reporting the content type
134 // * of this binary data, even if it is available to the parser.
|