All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jboss.resteasy.plugins.providers.FileRangeException Maven / Gradle / Ivy

There is a newer version: 4.0.0.Beta5
Show newest version
package org.jboss.resteasy.plugins.providers;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.io.File;

/**
 * @author Bill Burke
 * @version $Revision: 1 $
 */
public class FileRangeException extends WebApplicationException
{
   public FileRangeException(final MediaType mediaType, final File file, final long begin, final long end)
   {
      super(Response.status(206).entity(new FileRange(file, begin, end)).type(mediaType).build());
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy