本文整理了Java中org.commonjava.maven.galley.model.Transfer.length()
方法的一些代码示例,展示了Transfer.length()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Transfer.length()
方法的具体详情如下:
包路径:org.commonjava.maven.galley.model.Transfer
类名称:Transfer
方法名:length
暂无
代码示例来源:origin: org.commonjava.aprox/aprox-promote-common
@Override
public long length()
{
return delegate.length();
}
代码示例来源:origin: org.commonjava.indy/indy-dot-maven-common
@Override
public long getResourceLength( final ITransaction transaction, final String path )
throws WebdavException
{
final StoreURIMatcher matcher = new StoreURIMatcher( path );
if ( matcher.hasStorePath() )
{
final Transfer item = getTransfer( matcher );
if ( item != null )
{
return item.length();
}
}
return 0;
}
代码示例来源:origin: org.commonjava.aprox/aprox-dot-maven-common
@Override
public long getResourceLength( final ITransaction transaction, final String path )
throws WebdavException
{
final StoreURIMatcher matcher = new StoreURIMatcher( path );
if ( matcher.hasStorePath() )
{
final Transfer item = getTransfer( matcher );
if ( item != null )
{
return item.length();
}
}
return 0;
}
代码示例来源:origin: org.commonjava.indy/indy-subsys-jaxrs
logger.debug( "Adding Content-Length header: {}", item.length() );
builder.header( ApplicationHeader.content_length.key(), item.length() );
代码示例来源:origin: org.commonjava.indy/indy-dot-maven-common
return item.length();
代码示例来源:origin: org.commonjava.aprox/aprox-dot-maven-common
return item.length();
代码示例来源:origin: org.commonjava.indy/indy-dot-maven-common
@Override
public StoredObject getStoredObject( final ITransaction transaction, final String uri )
throws WebdavException
{
final StoredObject so = new StoredObject();
final StoreURIMatcher matcher = new StoreURIMatcher( uri );
if ( matcher.hasStorePath() )
{
final Transfer item = getTransfer( matcher );
if ( item == null )
{
return null;
}
so.setCreationDate( new Date( item.lastModified() ) );
so.setLastModified( new Date( item.lastModified() ) );
so.setFolder( item.isDirectory() );
so.setResourceLength( item.length() );
}
else
{
final Date d = new Date();
so.setCreationDate( d );
so.setLastModified( d );
so.setFolder( true );
}
return so;
}
代码示例来源:origin: org.commonjava.aprox/aprox-dot-maven-common
@Override
public StoredObject getStoredObject( final ITransaction transaction, final String uri )
throws WebdavException
{
final StoredObject so = new StoredObject();
final StoreURIMatcher matcher = new StoreURIMatcher( uri );
if ( matcher.hasStorePath() )
{
final Transfer item = getTransfer( matcher );
if ( item == null )
{
return null;
}
so.setCreationDate( new Date( item.lastModified() ) );
so.setLastModified( new Date( item.lastModified() ) );
so.setFolder( item.isDirectory() );
so.setResourceLength( item.length() );
}
else
{
final Date d = new Date();
so.setCreationDate( d );
so.setLastModified( d );
so.setFolder( true );
}
return so;
}
内容来源于网络,如有侵权,请联系作者删除!