本文整理了Java中java.util.logging.Formatter.getTail()
方法的一些代码示例,展示了Formatter.getTail()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Formatter.getTail()
方法的具体详情如下:
包路径:java.util.logging.Formatter
类名称:Formatter
方法名:getTail
[英]Gets the tail string used to wrap a set of log records. This base class always returns the empty string.
[中]获取用于包装一组日志记录的尾部字符串。这个基类总是返回空字符串。
代码示例来源:origin: org.postgresql/postgresql
private synchronized void flushAndClose() throws SecurityException {
if (writer != null) {
try {
if (!doneHeader) {
writer.write(getFormatter().getHead(this));
doneHeader = true;
}
writer.write(getFormatter().getTail(this));
writer.flush();
writer.close();
} catch (Exception ex) {
// We don't want to throw an exception here, but we
// report the exception to any registered ErrorManager.
reportError(null, ex, ErrorManager.CLOSE_FAILURE);
}
writer = null;
}
}
代码示例来源:origin: robovm/robovm
/**
* Closes this handler, but the underlying output stream is only closed if
* {@code closeStream} is {@code true}. Security is not checked.
*
* @param closeStream
* whether to close the underlying output stream.
*/
void close(boolean closeStream) {
if (this.os != null) {
if (this.writerNotInitialized) {
initializeWriter();
}
write(getFormatter().getTail(this));
try {
this.writer.flush();
if (closeStream) {
this.writer.close();
this.writer = null;
this.os = null;
}
} catch (Exception e) {
getErrorManager().error("Exception occurred when closing the output stream", e,
ErrorManager.CLOSE_FAILURE);
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Creates the tail or reports a formatting error.
* @param f the formatter.
* @param def the default string to use when there is an error.
* @return the tail string or the given default string.
*/
private String tail(final Formatter f, final String def) {
try {
return f.getTail(this);
} catch (final RuntimeException RE) {
reportError(RE.getMessage(), RE, ErrorManager.FORMAT_FAILURE);
return def;
}
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Creates the tail or reports a formatting error.
* @param f the formatter.
* @param def the default string to use when there is an error.
* @return the tail string or the given default string.
*/
private String tail(final Formatter f, final String def) {
try {
return f.getTail(this);
} catch (final RuntimeException RE) {
reportError(RE.getMessage(), RE, ErrorManager.FORMAT_FAILURE);
return def;
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void closeWriter() {
writerLock.writeLock().lock();
try {
if (writer == null)
return;
writer.write(getFormatter().getTail(this));
writer.flush();
writer.close();
writer = null;
date = "";
} catch (Exception e) {
reportError(null, e, ErrorManager.CLOSE_FAILURE);
} finally {
writerLock.writeLock().unlock();
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
super.getTail(h); //Be forward compatible with super.getHead.
return formatRecord(h, true);
代码示例来源:origin: com.sun.mail/javax.mail
super.getTail(h); //Be forward compatible with super.getHead.
return formatRecord(h, true);
代码示例来源:origin: camunda/camunda-bpm-platform
head = f.getHead(h);
msg = record != null ? f.format(record) : "";
tail = f.getTail(h);
代码示例来源:origin: com.sun.mail/javax.mail
head = f.getHead(h);
msg = record != null ? f.format(record) : "";
tail = f.getTail(h);
代码示例来源:origin: danfickle/openhtmltopdf
/**
* Return the tail string for a set of formatted records.
*
* @param h PARAM
* @return The tail value
*/
public String getTail( Handler h ) {
return super.getTail( h );
}
代码示例来源:origin: com.google.code.maven-play-plugin.org.xhtmlrenderer/core-renderer
/**
* Return the tail string for a set of formatted records.
*
* @param h PARAM
* @return The tail value
*/
public String getTail( Handler h ) {
return super.getTail( h );
}
代码示例来源:origin: wireapp/lithium
@Override
public String getTail(Handler h) {
return super.getTail(h);
}
}
代码示例来源:origin: org.docx4j/xhtmlrenderer
/**
* Return the tail string for a set of formatted records.
*
* @param h PARAM
* @return The tail value
*/
public String getTail( Handler h ) {
return super.getTail( h );
}
代码示例来源:origin: org.xhtmlrenderer/core-renderer
/**
* Return the tail string for a set of formatted records.
*
* @param h PARAM
* @return The tail value
*/
public String getTail( Handler h ) {
return super.getTail( h );
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
private String tail(final Formatter f, final String def) {
try {
return f.getTail(this);
} catch (final RuntimeException RE) {
reportError(RE.getMessage(), RE, ErrorManager.FORMAT_FAILURE);
return def;
}
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Creates the tail or reports a formatting error.
* @param f the formatter.
* @param def the default string to use when there is an error.
* @return the tail string or the given default string.
*/
private String tail(final Formatter f, final String def) {
try {
return f.getTail(this);
} catch (final RuntimeException RE) {
reportError(RE.getMessage(), RE, ErrorManager.FORMAT_FAILURE);
return def;
}
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Creates the tail or reports a formatting error.
* @param f the formatter.
* @param def the default string to use when there is an error.
* @return the tail string or the given default string.
*/
private String tail(final Formatter f, final String def) {
try {
return f.getTail(this);
} catch (final RuntimeException RE) {
reportError(RE.getMessage(), RE, ErrorManager.FORMAT_FAILURE);
return def;
}
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Creates the tail or reports a formatting error.
* @param f the formatter.
* @param def the default string to use when there is an error.
* @return the tail string or the given default string.
*/
private String tail(final Formatter f, final String def) {
try {
return f.getTail(this);
} catch (final RuntimeException RE) {
reportError(RE.getMessage(), RE, ErrorManager.FORMAT_FAILURE);
return def;
}
}
代码示例来源:origin: org.jboss.logmanager/jboss-logmanager
private void writeTail(final Writer writer) {
try {
final Formatter formatter = getFormatter();
if (formatter != null) writer.write(formatter.getTail(this));
} catch (Exception ex) {
reportError("Error writing section tail", ex, ErrorManager.WRITE_FAILURE);
}
}
代码示例来源:origin: org.jboss.logmanager/jboss-logmanager
private void writeTail(final Writer writer) {
try {
final Formatter formatter = getFormatter();
if (formatter != null) writer.write(formatter.getTail(this));
} catch (Exception ex) {
reportError("Error writing section tail", ex, ErrorManager.WRITE_FAILURE);
}
}
内容来源于网络,如有侵权,请联系作者删除!