1 | public void exportObject(FileOutputStream outStream, String text)↵ | | 1 | public void exportObject(FileOutputStream outStream, String text)↵
|
2 | throws IOException {↵ | | 2 | throws IOException {↵
|
|
3 | OutputStreamWriter outWriter = new OutputStreamWriter(outStream);↵ | | 3 | OutputStreamWriter outWriter = new OutputStreamWriter(outStream);↵
|
|
4 | // check that the text is a valid representation↵ | | 4 | // check that the text is a valid representation↵
|
5 | StringBuffer messageBuffer = new StringBuffer();↵ | | 5 | StringBuffer messageBuffer = new StringBuffer();↵
|
6 | validateAndConvertInPopup(text, null, messageBuffer);↵ | | 6 | validateAndConvertInPopup(text, null, messageBuffer);↵
|
7 | if (messageBuffer.length() > 0) {↵ | | 7 | if (messageBuffer.length() > 0) {↵
|
8 | // there was an error in the conversion↵ | | 8 | // there was an error in the conversion↵
|
9 | throw new IOException(new String(messageBuffer));↵ | | 9 | throw new IOException(new String(messageBuffer));↵
|
10 | }↵ | | 10 | }↵
|
|
11 | // just send the text to the output file↵ | | 11 | // just send the text to the output file↵
|
12 | outWriter.write(text);↵ | | 12 | outWriter.write(text);↵
|
13 | outWriter.flush();↵ | | 13 | outWriter.flush();↵
|
14 | outWriter.close();↵ | | 14 | outWriter.close();↵
|
15 | | | 15 |
|