Package org.sonatype.plexus.rest.representation

Examples of org.sonatype.plexus.rest.representation.InputStreamRepresentation


      else {
        result = getNexusConfiguration().getConfigurationAsStreamByKey(key);
      }

      // TODO: make this real resource being able to be polled (ETag and last modified support)
      return new InputStreamRepresentation(MediaType.valueOf(result.getMimeType()), result.getInputStream());
    }
    catch (IOException e) {
      throw new ResourceException(Status.SERVER_ERROR_INTERNAL, "IOException during configuration retrieval!", e);
    }
  }
View Full Code Here


      // representation
      return (Representation) payload;
    }
    else if (InputStream.class.isAssignableFrom(payload.getClass())) {
      // inputStream
      return new InputStreamRepresentation(variant.getMediaType(), (InputStream) payload);
    }
    else if (String.class.isAssignableFrom(payload.getClass())) {
      // inputStream
      return new StringRepresentation((String) payload, variant.getMediaType());
    }
View Full Code Here

TOP

Related Classes of org.sonatype.plexus.rest.representation.InputStreamRepresentation

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.