Example usage for com.liferay.portal.kernel.util FileUtil getBytes

List of usage examples for com.liferay.portal.kernel.util FileUtil getBytes

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util FileUtil getBytes.

Prototype

public static byte[] getBytes(InputStream is, int bufferSize) throws IOException 

Source Link

Usage

From source file:com.liferay.adaptive.media.image.internal.test.AdaptiveMediaImageDeleteConfigurationTest.java

License:Open Source License

private FileEntry _addFileEntry() throws Exception {
    return DLAppLocalServiceUtil.addFileEntry(TestPropsValues.getUserId(), _group.getGroupId(),
            DLFolderConstants.DEFAULT_PARENT_FOLDER_ID, StringUtil.randomString() + ".jpg",
            ContentTypes.IMAGE_JPEG,/*from   w  w w  . jav  a 2 s.  co  m*/
            FileUtil.getBytes(AdaptiveMediaImageDeleteConfigurationTest.class, _PNG_IMAGE_FILE_PATH),
            new ServiceContext());
}

From source file:com.liferay.adaptive.media.image.item.selector.internal.resolver.test.FileEntryAdaptiveMediaImageFileEntryItemSelectorReturnTypeResolverTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(FileEntryAdaptiveMediaImageFileEntryItemSelectorReturnTypeResolverTest.class,
            "/com/liferay/adaptive/media/image/item/selector/internal"
                    + "/resolver/test/dependencies/image.jpg");
}

From source file:com.liferay.adaptive.media.image.item.selector.internal.resolver.test.FileEntryAdaptiveMediaImageURLItemSelectorReturnTypeResolverTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(FileEntryAdaptiveMediaImageURLItemSelectorReturnTypeResolverTest.class,
            "/com/liferay/adaptive/media/image/item/selector/internal"
                    + "/resolver/test/dependencies/image.jpg");
}

From source file:com.liferay.adaptive.media.image.item.selector.internal.resolver.test.FileEntryAMImageFileEntryItemSelectorReturnTypeResolverTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(FileEntryAMImageFileEntryItemSelectorReturnTypeResolverTest.class,
            "/com/liferay/adaptive/media/image/item/selector/internal"
                    + "/resolver/test/dependencies/image.jpg");
}

From source file:com.liferay.adaptive.media.image.item.selector.internal.resolver.test.FileEntryAMImageURLItemSelectorReturnTypeResolverTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(FileEntryAMImageURLItemSelectorReturnTypeResolverTest.class,
            "/com/liferay/adaptive/media/image/item/selector/internal"
                    + "/resolver/test/dependencies/image.jpg");
}

From source file:com.liferay.adaptive.media.image.item.selector.internal.test.FileEntryAMImageFileEntryItemSelectorReturnTypeResolverTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(FileEntryAMImageFileEntryItemSelectorReturnTypeResolverTest.class,
            "/com/liferay/adaptive/media/image/item/selector/internal/test" + "/dependencies/image.jpg");
}

From source file:com.liferay.adaptive.media.image.processor.test.AdaptiveMediaImageProcessorTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(AdaptiveMediaImageProcessorTest.class,
            "/com/liferay/adaptive/media/image/processor/test/dependencies" + "/image.jpg");
}

From source file:com.liferay.adaptive.media.image.processor.test.AMImageProcessorTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(AMImageProcessorTest.class,
            "/com/liferay/adaptive/media/image/dependencies/image.jpg");
}

From source file:com.liferay.adaptive.media.image.processor.test.FileEntryImageAdaptiveMediaURLItemSelectorReturnTypeResolverTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(FileEntryImageAdaptiveMediaURLItemSelectorReturnTypeResolverTest.class,
            "/com/liferay/adaptive/media/image/processor/test/dependencies/" + "image.jpg");
}

From source file:com.liferay.adaptive.media.image.processor.test.ImageAdaptiveMediaProcessorTest.java

License:Open Source License

private byte[] _getImageBytes() throws Exception {
    return FileUtil.getBytes(ImageAdaptiveMediaProcessorTest.class,
            "/com/liferay/adaptive/media/image/processor/test/dependencies/" + "image.jpg");
}