org.commonjava.maven.galley.model.Transfer.openOutputStream()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(5.5k)|赞(0)|评价(0)|浏览(158)

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

Transfer.openOutputStream介绍

暂无

代码示例

代码示例来源:origin: org.commonjava.maven.galley/galley-api

public OutputStream openOutputStream( final TransferOperation accessType )
  throws IOException
{
  return openOutputStream( accessType, true );
}

代码示例来源:origin: org.commonjava.maven.galley/galley-api

public OutputStream openOutputStream( final TransferOperation accessType, final boolean fireEvents,
                   final EventMetadata eventMetadata )
  throws IOException
{
  return openOutputStream( accessType, fireEvents, eventMetadata, false );
}

代码示例来源:origin: org.commonjava.maven.galley/galley-core

public final void write()
    throws IOException
{
  if ( !writeChecksumFile )
  {
    return;
  }
  logger.info( "Writing {} file: {}", checksumExtension, checksumTransfer );
  PrintStream out = null;
  OutputStream stream = null;
  try
  {
    stream = checksumTransfer.openOutputStream( TransferOperation.GENERATE );
    out = new PrintStream( stream );
    out.print( getDigestHex() );
  }
  finally
  {
    IOUtils.closeQuietly( out );
    IOUtils.closeQuietly( stream );
  }
}

代码示例来源:origin: org.commonjava.maven.galley/galley-transport-filearc

@Override
public DownloadJob call()
{
  FileInputStream in = null;
  OutputStream out = null;
  try
  {
    if ( src.exists() && !src.isDirectory() )
    {
      in = new FileInputStream( src );
      out = txfr.openOutputStream( TransferOperation.DOWNLOAD, true, eventMetadata );
      copy( in, out );
    }
    return this;
  }
  catch ( final IOException e )
  {
    error = new TransferException( "Failed to copy from: %s to: %s. Reason: %s", e, src, txfr, e.getMessage() );
  }
  finally
  {
    closeQuietly( in );
    closeQuietly( out );
  }
  return this;
}

代码示例来源:origin: org.commonjava.indy/indy-core

public final void writeMergeInfo( final String mergeInfo, final Group group, final String path )
{
  final String infoPath = path+MERGEINFO_SUFFIX;
  logger.trace( ".info file path is {} for group {} (members: {}), content is {}", infoPath, group.getKey(),
         group.getConstituents(), mergeInfo );
  final Transfer targetInfo = downloadManager.getStorageReference( group, infoPath );
  Writer fw = null;
  try
  {
    fw = new OutputStreamWriter( targetInfo.openOutputStream( TransferOperation.GENERATE ) );
    fw.write( mergeInfo );
  }
  catch ( final IOException e )
  {
    logger.error( String.format( "Failed to write merged metadata information to: %s.\nError: %s", targetInfo,
                   e.getMessage() ), e );
  }
  finally
  {
    closeQuietly( fw );
  }
}

代码示例来源:origin: org.commonjava.aprox/aprox-core

public final void writeMergeInfo( final byte[] data, final List<Transfer> sources, final Group group,
                 final String path )
{
  final Transfer targetInfo = downloadManager.getStorageReference( group, path + MERGEINFO_SUFFIX );
  Writer fw = null;
  try
  {
    fw = new OutputStreamWriter( targetInfo.openOutputStream( TransferOperation.GENERATE ) );
    for ( final Transfer source : sources )
    {
      final StoreKey key = getKey( source );
      fw.write( key.toString() );
      fw.write( "\n" );
    }
  }
  catch ( final IOException e )
  {
    logger.error( String.format( "Failed to write merged metadata information to: %s.\nError: %s", targetInfo, e.getMessage() ), e );
  }
  finally
  {
    closeQuietly( fw );
  }
}

代码示例来源:origin: org.commonjava.maven.galley/galley-transport-httpclient

out = metaTxfr.openOutputStream( TransferOperation.GENERATE, false );
logger.trace( "Writing HTTP exchange metadata:\n\n{}\n\n", new Object()

代码示例来源:origin: org.commonjava.maven.galley/galley-transport-httpclient

out = metaTxfr.openOutputStream( TransferOperation.GENERATE, false );
logger.trace( "Writing HTTP exchange metadata:\n\n{}\n\n", new Object()

代码示例来源:origin: org.commonjava.maven.galley/galley-transport-httpclient

out = target.openOutputStream( TransferOperation.DOWNLOAD, true, eventMetadata, deleteFilesOnPath );
doCopy( in, out );
logger.info( "Ensuring all HTTP data is consumed..." );

代码示例来源:origin: org.commonjava.indy/indy-dot-maven-common

writer = new OutputStreamWriter( item.openOutputStream( TransferOperation.UPLOAD ), characterEncoding );
writer = new OutputStreamWriter( item.openOutputStream( TransferOperation.UPLOAD ) );

代码示例来源:origin: org.commonjava.aprox/aprox-dot-maven-common

writer = new OutputStreamWriter( item.openOutputStream( TransferOperation.UPLOAD ), characterEncoding );
writer = new OutputStreamWriter( item.openOutputStream( TransferOperation.UPLOAD ) );

代码示例来源:origin: org.commonjava.aprox/aprox-core

stream = metadataFile.openOutputStream( TransferOperation.GENERATE, true, eventMetadata );
stream.write( xmlStr.getBytes( "UTF-8" ) );

代码示例来源:origin: org.commonjava.aprox/aprox-core

stream = metadataFile.openOutputStream( TransferOperation.GENERATE, true, eventMetadata );
stream.write( xmlStr.getBytes( "UTF-8" ) );

代码示例来源:origin: org.commonjava.maven.galley/galley-transport-filearc

out = getTransfer().openOutputStream( TransferOperation.DOWNLOAD, true, eventMetadata );

代码示例来源:origin: org.commonjava.maven.galley/galley-core

logger.debug( "Writing listing:\n\n{}\n\nto: {}", remoteListing, cachedListing );
stream = cachedListing.openOutputStream( TransferOperation.DOWNLOAD );
stream.write( join( remoteListing, "\n" ).getBytes( "UTF-8" ) );

代码示例来源:origin: org.commonjava.maven.galley/galley-core

try
  out = target.openOutputStream( TransferOperation.UPLOAD, true, eventMetadata );
  copy( stream, out );

代码示例来源:origin: org.commonjava.aprox/aprox-core

try
  fos = target.openOutputStream( TransferOperation.GENERATE, true, eventMetadata );
  fos.write( merged );

代码示例来源:origin: org.commonjava.aprox/aprox-core

try
  fos = target.openOutputStream( TransferOperation.GENERATE, true, eventMetadata );
  fos.write( merged );

代码示例来源:origin: org.commonjava.indy/indy-pkg-npm-common

try
  fos = target.openOutputStream( TransferOperation.GENERATE, true, eventMetadata );
  fos.write( merged );

相关文章