import java.io.InputStream;
import java.lang.StringBuilder;
import com.sterlingcommerce.woodstock.workflow.Document;
import com.sterlingcommerce.woodstock.util.Base64;
Document doc = wfc.getPrimaryDocument();
InputStream in = doc.getInputStream();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < in.available(); i++) {
sb.append(in.read());
}
byte data[] = sb.toString().getBytes();
byte newdata[] = Base64.encode(data);
doc.setBody(new String( ""+ new String(newdata)+" ").getBytes());
return new String(sb.toString());
import java.lang.StringBuilder;
import com.sterlingcommerce.woodstock.workflow.Document;
import com.sterlingcommerce.woodstock.util.Base64;
Document doc = wfc.getPrimaryDocument();
InputStream in = doc.getInputStream();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < in.available(); i++) {
sb.append(in.read());
}
byte data[] = sb.toString().getBytes();
byte newdata[] = Base64.encode(data);
doc.setBody(new String( "
return new String(sb.toString());
No comments:
Post a Comment