Class AbstractContentAccessor

    • Constructor Detail

      • AbstractContentAccessor

        protected AbstractContentAccessor​(String contentUrl)
        Parameters:
        contentUrl - the content URL
    • Method Detail

      • channelOpened

        protected final void channelOpened()
        Derived classes can call this method to ensure that necessary trace logging is performed when the IO Channel is opened.
      • setContentUrl

        protected void setContentUrl​(String contentUrl)
        Allow derived implementations to set the Content URL. This allows for implementations where the URL is not known when the accessor is first constructed.
        Parameters:
        contentUrl - the new content URL
      • setMimetype

        public void setMimetype​(String mimetype)
        Specified by:
        setMimetype in interface ContentAccessor
        Parameters:
        mimetype - the underlying content's mimetype - null if unknown
      • setEncoding

        public void setEncoding​(String encoding)
        Specified by:
        setEncoding in interface ContentAccessor
        Parameters:
        encoding - the underlying content's encoding - null if unknown
      • setLocale

        public void setLocale​(Locale locale)
        Specified by:
        setLocale in interface ContentAccessor
        Parameters:
        locale - the content's locale, if known.
      • getCallbackFileChannel

        protected FileChannel getCallbackFileChannel​(FileChannel directChannel,
                                                     List<ContentStreamListener> listeners)
                                              throws ContentIOException
        Generate a callback instance of the FileChannel.
        Parameters:
        directChannel - the delegate that to perform the actual operations
        listeners - the listeners to call
        Returns:
        Returns a new channel that functions just like the original, except that it issues callbacks to the listeners
        Throws:
        ContentIOException