/** * Creates a new repository for the given file. The file must point to a directory. This constructor uses the default * mime-registry. * * @param file the directory, which should form the root of the repository. * @throws ContentIOException if an error prevents the repository creation. */ public FileObjectRepository( final FileObject file ) throws ContentIOException { this( file, new DefaultMimeRegistry() ); }
/** * Creates a new repository for the given file. The file must point to a directory. This constructor uses the default * mime-registry. * * @param file the directory, which should form the root of the repository. * @throws ContentIOException if an error prevents the repository creation. */ public FileRepository( final File file ) throws ContentIOException { this( file, new DefaultMimeRegistry() ); }
public ZipRepository( final OutputStream out, final int level ) { this( out, level, new DefaultMimeRegistry() ); }
public EmailRepository( final MimeMessage htmlEmail ) throws ContentIOException, IOException, MessagingException { this( htmlEmail, new DefaultMimeRegistry() ); }
public ZipReadRepository( final InputStream in ) throws IOException { this( in, new DefaultMimeRegistry() ); }
public ZipRepository( final InputStream in ) throws IOException { this( in, new DefaultMimeRegistry() ); }
public EmailRepository( final Session session ) throws ContentIOException, MessagingException { this( new DefaultMimeRegistry(), session ); }
public ZipRepository( final OutputStream out ) { this( out, Deflater.DEFAULT_COMPRESSION, new DefaultMimeRegistry() ); }
public ZipRepository() { this( new DefaultMimeRegistry() ); }
/** * Creates a new dummy repository. */ public DummyRepository() { location = new DummyContentLocation( this, "" ); mimeRegistry = new DefaultMimeRegistry(); }
/** * Creates a new repository that potentially allows both read and write access. If an input stream is given, then a * content name must be given as well. * * @param inputStream the inputstream from which to read from. * @param outputStream the output stream to which to write to. * @param contentName the content name by which the content should be accessed. */ public StreamRepository( final InputStream inputStream, final OutputStream outputStream, final String contentName ) { if ( contentName == null ) { throw new NullPointerException(); } if ( inputStream != null ) { this.inputStream = new WrappedInputStream( inputStream ); } if ( outputStream != null ) { this.outputStream = new WrappedOutputStream( outputStream ); } this.contentName = contentName; this.mimeRegistry = new DefaultMimeRegistry(); this.rootLocation = new StreamContentLocation( this ); }
final DefaultMimeRegistry mimeRegistry = new DefaultMimeRegistry();