本文整理汇总了Java中org.alfresco.repo.content.AbstractContentReader类的典型用法代码示例。如果您正苦于以下问题:Java AbstractContentReader类的具体用法?Java AbstractContentReader怎么用?Java AbstractContentReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AbstractContentReader类属于org.alfresco.repo.content包,在下文中一共展示了AbstractContentReader类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testSetReaderLimits
import org.alfresco.repo.content.AbstractContentReader; //导入依赖的package包/类
@Test
public void testSetReaderLimits() throws Exception
{
AbstractContentReader reader = new DummyAbstractContentReader(0, 0);
long value = 1234;
transformer.setTimeoutMs(value);
transformer.register();
assertEquals("Limit should not have been set in the reader", null, reader.getLimits());
transformer.setReaderLimits(reader, null, options);
assertEquals("Limit should have been set in the reader", value, reader.getLimits().getTimeoutMs());
options.setTimeoutMs(--value);
transformer.setReaderLimits(reader, null, options);
assertEquals("Limit should have been set in the reader", value, reader.getLimits().getTimeoutMs());
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:19,代码来源:AbstractContentTransformerLimitsTest.java
示例2: testGetContentBinary_01
import org.alfresco.repo.content.AbstractContentReader; //导入依赖的package包/类
public void testGetContentBinary_01() throws Exception
{
// To URL
String url = SpoofedTextContentReader.createContentUrl(Locale.ENGLISH, 12345L, 56L, "harry");
// To Reader
ContentReader reader = new SpoofedTextContentReader(url);
InputStream is = reader.getContentInputStream();
try
{
byte[] bytes = FileCopyUtils.copyToByteArray(is);
assertEquals(56L, bytes.length);
}
finally
{
is.close();
}
// Compare readers
ContentReader copyOne = reader.getReader();
ContentReader copyTwo = reader.getReader();
// Get exactly the same binaries
assertTrue(AbstractContentReader.compareContentReaders(copyOne, copyTwo));
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:23,代码来源:SpoofedTextContentReaderTest.java
示例3: RoutingContentReader
import org.alfresco.repo.content.AbstractContentReader; //导入依赖的package包/类
public RoutingContentReader(ContentReader realContentReader, CompressingContentStore contentStore)
{
super(realContentReader.getContentUrl());
this.realContentReader = realContentReader;
this.contentStore = contentStore;
// We can shortcut some things if we're wrapping an AbstractContentReader
if (realContentReader instanceof AbstractContentReader)
{
this.realContentReaderA = (AbstractContentReader)realContentReader;
}
else
{
this.realContentReaderA = null;
}
}
开发者ID:Gagravarr,项目名称:AlfrescoCompressingContentStore,代码行数:17,代码来源:RoutingContentReader.java
示例4: setReaderLimits
import org.alfresco.repo.content.AbstractContentReader; //导入依赖的package包/类
/**
* Pass on any limits to the reader. Will only do so if the reader is an
* {@link AbstractContentReader}.
* @param reader passed to {@link #transform(ContentReader, ContentWriter, TransformationOptions)}.
* @param writer passed to {@link #transform(ContentReader, ContentWriter, TransformationOptions)}.
* @param options passed to {@link #transform(ContentReader, ContentWriter, TransformationOptions)}.
*/
protected void setReaderLimits(ContentReader reader, ContentWriter writer,
TransformationOptions options)
{
if (reader instanceof AbstractContentReader)
{
AbstractContentReader abstractContentReader = (AbstractContentReader)reader;
TransformationOptionLimits limits = getLimits(reader, writer, options);
abstractContentReader.setLimits(limits);
abstractContentReader.setTransformerDebug(transformerDebug);
}
}
开发者ID:Alfresco,项目名称:alfresco-repository,代码行数:19,代码来源:AbstractContentTransformerLimits.java
示例5: DecompressingContentReader
import org.alfresco.repo.content.AbstractContentReader; //导入依赖的package包/类
public DecompressingContentReader(ContentReader realContentReader)
{
super(realContentReader.getContentUrl());
this.realContentReader = realContentReader;
// We can shortcut some things if we're wrapping an AbstractContentReader
if (realContentReader instanceof AbstractContentReader)
{
this.realContentReaderA = (AbstractContentReader)realContentReader;
}
else
{
this.realContentReaderA = null;
}
}
开发者ID:Gagravarr,项目名称:AlfrescoCompressingContentStore,代码行数:16,代码来源:DecompressingContentReader.java
注:本文中的org.alfresco.repo.content.AbstractContentReader类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论