io.advantageous.boon.core.IO.copy()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(270)

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

IO.copy介绍

暂无

代码示例

代码示例来源:origin: io.advantageous.boon/boon-reflekt

  1. public static char[] readCharBuffer( Reader input ) {
  2. try {
  3. CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
  4. copy( input, sw );
  5. return sw.toCharArray();
  6. } finally {
  7. try {
  8. input.close();
  9. } catch ( IOException e ) {
  10. Exceptions.handle( e );
  11. }
  12. }
  13. }

代码示例来源:origin: com.github.advantageous/boon-reflekt

  1. public static String read( Reader input ) {
  2. try {
  3. CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
  4. copy( input, sw );
  5. return sw.toString();
  6. } finally {
  7. try {
  8. input.close();
  9. } catch ( IOException e ) {
  10. Exceptions.handle( e );
  11. }
  12. }
  13. }

代码示例来源:origin: io.advantageous.boon/boon-reflekt

  1. public static String read( Reader input ) {
  2. try {
  3. CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
  4. copy( input, sw );
  5. return sw.toString();
  6. } finally {
  7. try {
  8. input.close();
  9. } catch ( IOException e ) {
  10. Exceptions.handle( e );
  11. }
  12. }
  13. }

代码示例来源:origin: com.github.advantageous/boon-reflekt

  1. public static char[] readCharBuffer( Reader input ) {
  2. try {
  3. CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
  4. copy( input, sw );
  5. return sw.toCharArray();
  6. } finally {
  7. try {
  8. input.close();
  9. } catch ( IOException e ) {
  10. Exceptions.handle( e );
  11. }
  12. }
  13. }

代码示例来源:origin: io.advantageous.boon/boon-reflekt

  1. public static CharBuf read( Reader input, CharBuf charBuf, final int bufSize, char[] copyBuffer ) {
  2. if ( charBuf == null ) {
  3. charBuf = CharBuf.create( bufSize );
  4. } else {
  5. charBuf.readForRecycle();
  6. }
  7. try {
  8. char[] buffer = charBuf.toCharArray();
  9. int size = input.read( buffer );
  10. if ( size != -1 ) {
  11. charBuf._len( size );
  12. }
  13. if ( size < buffer.length ) {
  14. return charBuf;
  15. }
  16. copy( input, charBuf, copyBuffer );
  17. } catch ( IOException e ) {
  18. Exceptions.handle( e );
  19. } finally {
  20. try {
  21. input.close();
  22. } catch ( IOException e ) {
  23. Exceptions.handle( e );
  24. }
  25. }
  26. return charBuf;
  27. }

代码示例来源:origin: com.github.advantageous/boon-reflekt

  1. public static CharBuf read( Reader input, CharBuf charBuf, final int bufSize, char[] copyBuffer ) {
  2. if ( charBuf == null ) {
  3. charBuf = CharBuf.create( bufSize );
  4. } else {
  5. charBuf.readForRecycle();
  6. }
  7. try {
  8. char[] buffer = charBuf.toCharArray();
  9. int size = input.read( buffer );
  10. if ( size != -1 ) {
  11. charBuf._len( size );
  12. }
  13. if ( size < buffer.length ) {
  14. return charBuf;
  15. }
  16. copy( input, charBuf, copyBuffer );
  17. } catch ( IOException e ) {
  18. Exceptions.handle( e );
  19. } finally {
  20. try {
  21. input.close();
  22. } catch ( IOException e ) {
  23. Exceptions.handle( e );
  24. }
  25. }
  26. return charBuf;
  27. }

相关文章