487 |
throws IOException |
throws IOException |
488 |
{ |
{ |
489 |
OutputStream out = null; |
OutputStream out = null; |
490 |
|
boolean created = false; |
491 |
try |
try |
492 |
{ |
{ |
493 |
out = sr.getOutputStream(); |
out = sr.getOutputStream(); |
524 |
URL url = new URL(systemId); |
URL url = new URL(systemId); |
525 |
out = new FileOutputStream(url.getPath()); |
out = new FileOutputStream(url.getPath()); |
526 |
} |
} |
527 |
|
created = true; |
528 |
} |
} |
529 |
out = new BufferedOutputStream(out); |
out = new BufferedOutputStream(out); |
530 |
StreamSerializer serializer = |
StreamSerializer serializer = |
541 |
{ |
{ |
542 |
try |
try |
543 |
{ |
{ |
544 |
if (out != null) |
if (out != null && created) |
545 |
{ |
{ |
546 |
out.close(); |
out.close(); |
547 |
} |
} |