Examples of ByteArrayContentLocator


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

    if (downUrls.contains(baseUrl)) {
      throw new RemoteStorageException("Mock " + baseUrl + " is expected to be down.");
    }

    if (validUrls.contains(requestUrl)) {
      return new DefaultStorageFileItem(repository, request, true, false, new ByteArrayContentLocator(
          "Mock".getBytes(), "plain/text"));
    }

    // else
    throw new ItemNotFoundException(request);
View Full Code Here

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

    DefaultStorageFileItem file = new DefaultStorageFileItem(
        repository,
        new ResourceStoreRequest(path),
        true,
        true,
        new ByteArrayContentLocator(data, "text/xml"));

    repository.storeItem(false, file);

    lastWriteFile = file;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.