You must specify the output file for the main function now
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@352857 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2866a81100
commit
973c030536
@ -125,6 +125,9 @@ public class WordDocument
|
|||||||
/** length of footnotes text*/
|
/** length of footnotes text*/
|
||||||
int _ccpFtn;
|
int _ccpFtn;
|
||||||
|
|
||||||
|
/** The name of the file to write to */
|
||||||
|
String _outName
|
||||||
|
|
||||||
/** OLE stuff*/
|
/** OLE stuff*/
|
||||||
private InputStream istream;
|
private InputStream istream;
|
||||||
/** OLE stuff*/
|
/** OLE stuff*/
|
||||||
@ -158,6 +161,7 @@ public class WordDocument
|
|||||||
}*/
|
}*/
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
_outName = args[1];
|
||||||
WordDocument file = new WordDocument(args[0]);
|
WordDocument file = new WordDocument(args[0]);
|
||||||
file.closeDoc();
|
file.closeDoc();
|
||||||
}
|
}
|
||||||
@ -1529,7 +1533,7 @@ public class WordDocument
|
|||||||
//test code
|
//test code
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OutputStreamWriter test = new OutputStreamWriter(new FileOutputStream("/home/andy/test.xml"), "8859_1");
|
OutputStreamWriter test = new OutputStreamWriter(new FileOutputStream(_outName), "8859_1");
|
||||||
test.write(_headerBuffer.toString());
|
test.write(_headerBuffer.toString());
|
||||||
test.write(_bodyBuffer.toString());
|
test.write(_bodyBuffer.toString());
|
||||||
test.flush();
|
test.flush();
|
||||||
|
Loading…
Reference in New Issue
Block a user