public static Collection < ContentStream > toContentStreams ( final String str , final String contentType ) { if ( str == null ) { return null ; } ArrayList < ContentStream > streams = new ArrayList <> ( 1 ) ; ContentStreamBase ccc = new ContentStreamBase . StringStream ( str ) ; ccc . setContentType ( contentType ) ; streams . add ( ccc ) ; return streams ; }
Take a string and make it an iterable ContentStream