Package org.jboss.capedwarf.server.api.domain

Examples of org.jboss.capedwarf.server.api.domain.AbstractImage


public abstract class AbstractDatabaseBlobService<T extends AbstractImage> extends AbstractSimpleBlobService {
    private ImageDAO<T> imageDAO;

    protected byte[] loadBytesInternal(String key, long startIndex, long endIndex) {
        Long id = Long.parseLong(key);
        AbstractImage image = imageDAO.find(id);
        if (image != null) {
            long min = (endIndex == Long.MAX_VALUE) ? image.getLength() : endIndex;
            try {
                return image.read(startIndex, min);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
        return null;
View Full Code Here

TOP

Related Classes of org.jboss.capedwarf.server.api.domain.AbstractImage

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.