Package org.rundeck.storage.api

Examples of org.rundeck.storage.api.HasInputStream


     * @return new resource
     */
    private ResourceMeta filter(Path path, ResourceMeta resourceMeta, Operation op) {
        ResourceMetaBuilder resourceMetaBuilder = StorageUtil.create(new HashMap<String,
                String>(resourceMeta.getMeta()));
        final HasInputStream result;
        switch (op) {
            case READ:
            case UPDATE:
            case CREATE:
                try {
View Full Code Here


     * @param stream
     *
     * @return
     */
    protected HasInputStream synchStream(final Path path, final HasInputStream stream) {
        return new HasInputStream() {
            @Override
            public InputStream getInputStream() throws IOException {
                ByteArrayOutputStream bytes = new ByteArrayOutputStream();
                writeContent(bytes);
                return new ByteArrayInputStream(bytes.toByteArray());
View Full Code Here

     * @param data file
     *
     * @return
     */
    public static HasInputStream lazyStream(final InputStream data) {
        return new HasInputStream() {
            @Override
            public InputStream getInputStream() throws IOException {
                return data;
            }

View Full Code Here

     * @param data file
     *
     * @return
     */
    public static HasInputStream lazyFileStream(final File data) {
        return new HasInputStream() {
            @Override
            public InputStream getInputStream() throws IOException {
                return new FileInputStream(data);
            }

View Full Code Here

     * @param doEncode          true to encode
     *
     * @return lazy stream
     */
    private static HasInputStream wrap(final HasInputStream hasResourceStream, final boolean doEncode) {
        return new HasInputStream() {
            @Override
            public InputStream getInputStream() throws IOException {
                return new Base64InputStream(hasResourceStream.getInputStream(), doEncode);
            }

View Full Code Here

TOP

Related Classes of org.rundeck.storage.api.HasInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.