本文整理汇总了Java中com.helger.commons.collection.impl.ICommonsList.getClone方法的典型用法代码示例。如果您正苦于以下问题:Java ICommonsList.getClone方法的具体用法?Java ICommonsList.getClone怎么用?Java ICommonsList.getClone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.helger.commons.collection.impl.ICommonsList
的用法示例。
在下文中一共展示了ICommonsList.getClone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _decompressAttachments
import com.helger.commons.collection.impl.ICommonsList; //导入方法依赖的package包/类
private static void _decompressAttachments (@Nonnull final Ebms3UserMessage aUserMessage,
@Nonnull final IAS4MessageState aState,
@Nonnull final ICommonsList <WSS4JAttachment> aIncomingDecryptedAttachments)
{
for (final WSS4JAttachment aIncomingAttachment : aIncomingDecryptedAttachments.getClone ())
{
final EAS4CompressionMode eCompressionMode = aState.getAttachmentCompressionMode (aIncomingAttachment.getId ());
if (eCompressionMode != null)
{
final IHasInputStream aOldISP = aIncomingAttachment.getInputStreamProvider ();
aIncomingAttachment.setSourceStreamProvider (new HasInputStream ( () -> {
try
{
return eCompressionMode.getDecompressStream (aOldISP.getInputStream ());
}
catch (final IOException ex)
{
throw new UncheckedIOException (ex);
}
}, aOldISP.isReadMultiple ()));
final String sAttachmentContentID = StringHelper.trimStart (aIncomingAttachment.getId (), "attachment=");
// x.getHref() != null needed since, if a message contains a payload and
// an attachment, it would throw a NullPointerException since a payload
// does not have anything written in its partinfo therefore also now
// href
final Ebms3PartInfo aPart = CollectionHelper.findFirst (aUserMessage.getPayloadInfo ().getPartInfo (),
x -> x.getHref () != null &&
x.getHref ().contains (sAttachmentContentID));
if (aPart != null)
{
final Ebms3Property aProperty = CollectionHelper.findFirst (aPart.getPartProperties ().getProperty (),
x -> x.getName ()
.equals (UserMessageCreator.PART_PROPERTY_MIME_TYPE));
if (aProperty != null)
{
aIncomingAttachment.overwriteMimeType (aProperty.getValue ());
}
}
}
}
}