本文整理了Java中io.advantageous.boon.core.IO.copy()
方法的一些代码示例,展示了IO.copy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IO.copy()
方法的具体详情如下:
包路径:io.advantageous.boon.core.IO
类名称:IO
方法名:copy
暂无
代码示例来源:origin: io.advantageous.boon/boon-reflekt
public static char[] readCharBuffer( Reader input ) {
try {
CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
copy( input, sw );
return sw.toCharArray();
} finally {
try {
input.close();
} catch ( IOException e ) {
Exceptions.handle( e );
}
}
}
代码示例来源:origin: com.github.advantageous/boon-reflekt
public static String read( Reader input ) {
try {
CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
copy( input, sw );
return sw.toString();
} finally {
try {
input.close();
} catch ( IOException e ) {
Exceptions.handle( e );
}
}
}
代码示例来源:origin: io.advantageous.boon/boon-reflekt
public static String read( Reader input ) {
try {
CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
copy( input, sw );
return sw.toString();
} finally {
try {
input.close();
} catch ( IOException e ) {
Exceptions.handle( e );
}
}
}
代码示例来源:origin: com.github.advantageous/boon-reflekt
public static char[] readCharBuffer( Reader input ) {
try {
CharBuf sw = CharBuf.create( DEFAULT_BUFFER_SIZE );
copy( input, sw );
return sw.toCharArray();
} finally {
try {
input.close();
} catch ( IOException e ) {
Exceptions.handle( e );
}
}
}
代码示例来源:origin: io.advantageous.boon/boon-reflekt
public static CharBuf read( Reader input, CharBuf charBuf, final int bufSize, char[] copyBuffer ) {
if ( charBuf == null ) {
charBuf = CharBuf.create( bufSize );
} else {
charBuf.readForRecycle();
}
try {
char[] buffer = charBuf.toCharArray();
int size = input.read( buffer );
if ( size != -1 ) {
charBuf._len( size );
}
if ( size < buffer.length ) {
return charBuf;
}
copy( input, charBuf, copyBuffer );
} catch ( IOException e ) {
Exceptions.handle( e );
} finally {
try {
input.close();
} catch ( IOException e ) {
Exceptions.handle( e );
}
}
return charBuf;
}
代码示例来源:origin: com.github.advantageous/boon-reflekt
public static CharBuf read( Reader input, CharBuf charBuf, final int bufSize, char[] copyBuffer ) {
if ( charBuf == null ) {
charBuf = CharBuf.create( bufSize );
} else {
charBuf.readForRecycle();
}
try {
char[] buffer = charBuf.toCharArray();
int size = input.read( buffer );
if ( size != -1 ) {
charBuf._len( size );
}
if ( size < buffer.length ) {
return charBuf;
}
copy( input, charBuf, copyBuffer );
} catch ( IOException e ) {
Exceptions.handle( e );
} finally {
try {
input.close();
} catch ( IOException e ) {
Exceptions.handle( e );
}
}
return charBuf;
}
内容来源于网络,如有侵权,请联系作者删除!