org.dspace.content.Bitstream.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.dspace.content.Bitstream.<init>()方法的一些代码示例,展示了Bitstream.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bitstream.<init>()方法的具体详情如下:
包路径:org.dspace.content.Bitstream
类名称:Bitstream
方法名:<init>

Bitstream.<init>介绍

[英]Protected constructor, create object using: org.dspace.content.service.BitstreamService#create(Context,Bundle,InputStream)or org.dspace.content.service.BitstreamService#create(Context,InputStream)
[中]受保护的构造函数,使用:org创建对象。数据空间。所容纳之物服务BitstreamService#创建(上下文、捆绑、输入流)或组织。数据空间。所容纳之物服务BitstreamService#创建(上下文、输入流)

代码示例

代码示例来源:origin: stackoverflow.com

Bitstream bitstream = new Bitstream(inputStream);
Decoder decoder = new Decoder();

代码示例来源:origin: DSpace/DSpace

@Override
public Bitstream create(Context context, InputStream is) throws IOException, SQLException {
  // Store the bits
  UUID bitstreamID = bitstreamStorageService.store(context, bitstreamDAO.create(context, new Bitstream()), is);
  log.info(LogManager.getHeader(context, "create_bitstream",
                 "bitstream_id=" + bitstreamID));
  // Set the format to "unknown"
  Bitstream bitstream = find(context, bitstreamID);
  setFormat(context, bitstream, null);
  context.addEvent(
    new Event(Event.CREATE, Constants.BITSTREAM, bitstreamID, null, getIdentifiers(context, bitstream)));
  return bitstream;
}

代码示例来源:origin: stackoverflow.com

try
  Bitstream m_bitstream = new Bitstream(pis);
  aff_properties.put("mp3.header.pos", new Integer(m_bitstream.header_pos()));
  Header m_header = m_bitstream.readFrame();

代码示例来源:origin: stackoverflow.com

.openConnection()
    .getInputStream();
final Bitstream bitstream = new Bitstream(in);

代码示例来源:origin: stackoverflow.com

InputStream inputStream = new BufferedInputStream(new FileInputStream(file), 8 * 1024);
try {
 Bitstream bitstream = new Bitstream(inputStream);
 Decoder decoder = new Decoder();

代码示例来源:origin: stackoverflow.com

Bitstream bitstream = new Bitstream(is);

代码示例来源:origin: stackoverflow.com

Bitstream bitstream = new Bitstream(in);
Decoder decoder = new Decoder();

代码示例来源:origin: DSpace/DSpace

throws IOException, SQLException, AuthorizeException {
Bitstream bitstream = bitstreamDAO.create(context, new Bitstream());
bitstreamStorageService.register(
  context, bitstream, assetstore, bitstreamPath);

代码示例来源:origin: DSpace/DSpace

@Override
public Bitstream clone(Context context, Bitstream bitstream)
    throws SQLException {
  // Create a new bitstream with a new ID.
  Bitstream clonedBitstream = bitstreamDAO.create(context, new Bitstream());
  // Set the internal identifier, file size, checksum, and
  // checksum algorithm as same as the given bitstream.
  clonedBitstream.setInternalId(bitstream.getInternalId());
  clonedBitstream.setSizeBytes(bitstream.getSizeBytes());
  clonedBitstream.setChecksum(bitstream.getChecksum());
  clonedBitstream.setChecksumAlgorithm(bitstream.getChecksumAlgorithm());
  clonedBitstream.setFormat(bitstream.getBitstreamFormat());
  try {
    //Update our bitstream but turn off the authorization system since permissions
    //haven't been set at this point in time.
    context.turnOffAuthorisationSystem();
    update(context, clonedBitstream);
  } catch (AuthorizeException e) {
    log.error(e);
    //Can never happen since we turn off authorization before we update
  } finally {
    context.restoreAuthSystemState();
  }
  return clonedBitstream;
}

相关文章