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