本文整理了Java中javax.mail.Message.getInputStream()
方法的一些代码示例,展示了Message.getInputStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.getInputStream()
方法的具体详情如下:
包路径:javax.mail.Message
类名称:Message
方法名:getInputStream
暂无
代码示例来源:origin: org.apache.jmeter/ApacheJMeter_mail
private byte[] processSampler(Message message) throws IOException, MessagingException {
// process the sampler result
try (InputStream is = message.getInputStream()) {
return IOUtils.toByteArray(is);
}
}
代码示例来源:origin: stackoverflow.com
Message message = new Message(inputStream);
results = process(message.getInputStream());
代码示例来源:origin: google/mail-importer
@Override
public InputStream getInputStream()
throws IOException, RuntimeMessagingException {
try {
return delegate.getInputStream();
} catch (MessagingException e) {
throw new RuntimeMessagingException(e);
}
}
代码示例来源:origin: org.apache.camel/camel-mail
/**
* Converts the given JavaMail message to an InputStream.
*/
@Converter
public static InputStream toInputStream(Message message) throws IOException, MessagingException {
return message.getInputStream();
}
代码示例来源:origin: org.springframework.ws/spring-ws-support
@Override
protected InputStream getRequestInputStream() throws IOException {
try {
return requestMessage.getInputStream();
}
catch (MessagingException ex) {
throw new MailTransportException(ex);
}
}
代码示例来源:origin: spring-projects/spring-ws
@Override
protected InputStream getRequestInputStream() throws IOException {
try {
return requestMessage.getInputStream();
}
catch (MessagingException ex) {
throw new MailTransportException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
protected InputStream getRequestInputStream() throws IOException {
try {
return requestMessage.getInputStream();
}
catch (MessagingException ex) {
throw new MailTransportException(ex);
}
}
代码示例来源:origin: it.unimi.di/mg4j
public InputStream stream( final int index ) throws IOException {
ensureDocumentIndex( index );
try {
// Can you believe that? Javamail numbers messages from 1...
return folder.getMessage( index + 1 ).getInputStream();
}
catch ( MessagingException e ) {
throw new IOException( e.toString() );
}
}
代码示例来源:origin: it.unimi.dsi/mg4j
public InputStream stream( final int index ) throws IOException {
ensureDocumentIndex( index );
try {
// Can you believe that? Javamail numbers messages from 1...
return folder.getMessage( index + 1 ).getInputStream();
}
catch ( MessagingException e ) {
throw new IOException( e.toString() );
}
}
代码示例来源:origin: it.unimi.dsi/mg4j-big
public InputStream stream( final long index ) throws IOException {
ensureDocumentIndex( index );
try {
// Can you believe that? Javamail numbers messages from 1...
return folder.getMessage( (int)( index + 1 ) ).getInputStream();
}
catch ( MessagingException e ) {
throw new IOException( e.toString() );
}
}
代码示例来源:origin: it.unimi.di/mg4j-big
public InputStream stream( final long index ) throws IOException {
ensureDocumentIndex( index );
try {
// Can you believe that? Javamail numbers messages from 1...
return folder.getMessage( (int)( index + 1 ) ).getInputStream();
}
catch ( MessagingException e ) {
throw new IOException( e.toString() );
}
}
代码示例来源:origin: apache/ofbiz-framework
protected String getContentText(Object content) {
if (content == null) {
return null;
}
if (content instanceof String) {
return (String) content;
} else if (content instanceof InputStream) {
return getTextFromStream((InputStream) content);
} else if (content instanceof Message) {
try {
return getTextFromStream(((Message) content).getInputStream());
} catch (Exception e) {
Debug.logError(e, module);
return null;
}
} else {
Debug.logWarning("Content was not a string or a stream; no known handler -- " + content.toString(), module);
return null;
}
}
代码示例来源:origin: Aresyi/smart-api
try {
br = new BufferedReader(new InputStreamReader(
msg.getInputStream(), "GBK"));
StringBuilder content = new StringBuilder();
String line;
代码示例来源:origin: Wikia/selenium-tests
String line;
StringBuilder builder = new StringBuilder();
InputStreamReader in = new InputStreamReader(m.getInputStream());
BufferedReader reader = new BufferedReader(in);
while ((line = reader.readLine()) != null) {
内容来源于网络,如有侵权,请联系作者删除!