Package org.sonatype.nexus.proxy.item

Examples of org.sonatype.nexus.proxy.item.AbstractContentLocator


  @Override
  public ContentLocator generateContent(final Repository repository,
                                        final String path,
                                        final StorageFileItem item)
  {
    return new AbstractContentLocator("text/plain", true, ContentLocator.UNKNOWN_LENGTH)
    {
      private String content;

      @Override
      public InputStream getContent()
View Full Code Here


  @Test
  public void testBundleItem1()
      throws Exception
  {
    final ContentLocator content = new AbstractContentLocator("application/java-archive", false, ContentLocator.UNKNOWN_LENGTH)
    {
      public InputStream getContent()
          throws IOException
      {
        return getResourceAsStream("/obr/jars/osgi.core.jar");
View Full Code Here

  @Test
  public void testBundleItem2()
      throws Exception
  {
    final ContentLocator content = new AbstractContentLocator("application/java-archive", false, ContentLocator.UNKNOWN_LENGTH)
    {
      public InputStream getContent()
          throws IOException
      {
        return getResourceAsStream("/obr/jars/org.eclipse.core.runtime_3.4.0.v20080512.jar");
View Full Code Here

  @Test
  public void testNonBundleItem()
      throws Exception
  {
    final ContentLocator content = new AbstractContentLocator("application/java-archive", false, ContentLocator.UNKNOWN_LENGTH)
    {
      public InputStream getContent()
          throws IOException
      {
        return getResourceAsStream("/obr/jars/maven-model-2.0.jar");
View Full Code Here

  @Test
  public void testBrokenStream()
      throws Exception
  {
    final ContentLocator content = new AbstractContentLocator("application/java-archive", false, ContentLocator.UNKNOWN_LENGTH)
    {
      public InputStream getContent()
          throws IOException
      {
        throw new IOException("EOF");
View Full Code Here

  @Test
  public void testNullStream()
      throws Exception
  {
    final ContentLocator content = new AbstractContentLocator("application/java-archive", false, ContentLocator.UNKNOWN_LENGTH)
    {
      public InputStream getContent()
          throws IOException
      {
        return null;
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.item.AbstractContentLocator

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.