de.pfabulist.unchecked.Unchecked.u()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(100)

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

Unchecked.u介绍

暂无

代码示例

代码示例来源:origin: de.pfabulist.lindwurm/stellvertreter

public Cipher getEncryptingCipher() {
  Cipher ecipher = u( () -> Cipher.getInstance( blockCipher.getBlockCipherDescription() ) );
  u( () -> ecipher.init( Cipher.ENCRYPT_MODE, keyspec ) );
  return ecipher;
}

代码示例来源:origin: de.pfabulist.lindwurm/stellvertreter

public Cipher getDecryptingCipher( byte[] iv ) {
  Cipher decipher = u( () -> Cipher.getInstance( blockCipher.getBlockCipherDescription() ) );
  u( () -> decipher.init( Cipher.DECRYPT_MODE, keyspec, new IvParameterSpec( iv ) ) );
  return decipher;
}

代码示例来源:origin: de.pfabulist.lindwurm/memoryfs

public PathContent getOrThrow( EightyPath path, Supplier<Exception> exSup ) {
    PathContent pc = content.get( path.getNormString() );
    if( pc == null ) {
      throw u( exSup.get() );
    }
    return pc;
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default void accept( double a ) {
  try {
    acceptE( a );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default void run(){
  try {
    runE();
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default long applyAsLong( int value ) {
  try {
    return applyAsLongE( value );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default double applyAsDouble( double a, double a2 ) {
  try {
    return applyAsDoubleE( a, a2 );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

default D apply( A a, B b, C c ) {
  try {
    return applyE( a, b, c );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default double applyAsDouble( int value ) {
  try {
    return applyAsDoubleE( value );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default A apply( long value ) {
  try {
    return applyE( value );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default boolean test( int value ) {
  try {
    return testE( value );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.lindwurm/stellvertreter

private static SecretKeySpec getSecretKeySpec( BlockCipher blockCipher, char[] passwd, byte[] salt ) {
  SecretKeyFactory factory = u( () -> SecretKeyFactory.getInstance( blockCipher.getKeyFactoryKind() ) );
  KeySpec spec = u( () -> new PBEKeySpec( passwd, salt, blockCipher.getIterationCount(), KeySize.get( blockCipher.getBlockCipherDescription() ) ) );
  SecretKey tmp = u( () -> factory.generateSecret( spec ) );
  return new SecretKeySpec( tmp.getEncoded(), blockCipher.getType() );
}

代码示例来源:origin: de.pfabulist.lindwurm/stellvertreter

default void copyDecrypt( InputStream in, Path tgt, boolean useSalt  ) {
  Filess.createDirectories( tgt.getParent() );
  try( OutputStream out = Files.newOutputStream( tgt, WRITE, TRUNCATE_EXISTING, CREATE ) ) {
    copyDecrypt( in, out, useSalt );
  } catch( IOException e ) {
    throw u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default
@Nullable
R apply( @Nullable A a ) {
  try {
    return applyE( _n0( a ) );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default long applyAsLong( @Nullable A value ) {
  try {
    return applyAsLongE( _n0( value ) );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default double applyAsDouble( @Nullable A value ) {
  try {
    return applyAsDoubleE( _n0( value ) );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist.kleinod/unchecked

@Override
default void accept( @Nullable A a, @Nullable B b ) {
  try {
    acceptE( _n0( a ), _n1( b ) );
  } catch( Exception e ) {
    throw Unchecked.u( e );
  }
}

代码示例来源:origin: de.pfabulist/elsewhere

@Override
public long getTotalSpace() {
  try {
    return Filess.getFileStore( root ).getTotalSpace();
  } catch( IOException e ) {
    throw u( e );
  }
}

代码示例来源:origin: de.pfabulist.lindwurm/stellvertreter

public Here( @Nonnull KryoProvider kp, @Nonnull Path root ) {
  this.root = root;
  this.fmio = new FMIO( kp );
  try {
    Files.createDirectories( root );
  } catch( IOException e ) {
    throw Unchecked.u( e );
  }
  elsewhereAdmin = new ElsewhereAdmin( root, new ElsewhereRegistry(), this );
  spaceControl = new SpaceControl( this );
  collectExistingFiles();
}

代码示例来源:origin: de.pfabulist.lindwurm/memoryntfs

@Override
public void checkAccess(EightyPath path, AccessMode... modes)  {
  try {
    EightyPath host = getHostPath( path );
    get80(host.getFileSystem()).checkAccess( host, modes );
  } catch (RuntimeException e) {
    throw u( new NoSuchFileException( "files does not exist " + path ) );
  }
}

相关文章

Unchecked类方法