public void write(int b) throws IOException { temp[0] = (byte) b; this.write(temp, 0, 1); }
/** * Writes the om to a log.debug. * Also calculates the length of the message. * @param om OMElement * @param log Log * @param limit limit of message to write * @param format OMOutputFormat * @return length of entire message */ public static long logDebug(OMElement om, Log log, int limit, OMOutputFormat format) { LogOutputStream logStream = new LogOutputStream(log, limit); try { om.serialize(logStream, format); logStream.flush(); logStream.close(); } catch (Throwable t) { // Problem occur while logging. Log error and continue log.debug(t); log.error(t); } return logStream.getLength(); }
/** * Generate. * * @throws Exception * the exception */ public void generate() throws Exception { LogOutputStream logOutputStream = new LogOutputStream(log, Integer.MAX_VALUE); WsgenTool genTool = new WsgenTool(logOutputStream); List<String> args = new ArrayList<String>(); configurImportToolOptions(args); mergeOriginalArgs(args); boolean success = genTool.run(args.toArray(new String[args.size()])); if (success) { log.info("Code generation completed"); } }
public void write(byte[] b) throws IOException { this.write(b, 0, b.length); }