- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for getChannel (0.22 sec)
-
okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt
FileOperator( randomAccessFile!!.getChannel(), ) val buffer = Buffer() operator.read(0, buffer, 5) assertThat(buffer.readUtf8()).isEqualTo("Hello") operator.read(4, buffer, 5) assertThat(buffer.readUtf8()).isEqualTo("o, Wo") } @Test fun write() { val operator = FileOperator( randomAccessFile!!.getChannel(), )
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.8K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/FileUtil.java
public static byte[] readBytes(final File file) { assertArgumentNotNull("file", file); final FileInputStream is = InputStreamUtil.create(file); try { final FileChannel channel = is.getChannel(); final ByteBuffer buffer = ByteBuffer.allocate((int) ChannelUtil.size(channel)); ChannelUtil.read(channel, buffer); return buffer.array(); } finally {
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 9K bytes - Viewed (0) -
maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultUpdateCheckManager.java
FileChannel channel = null; FileLock lock = null; try { Properties props = new Properties(); channel = new RandomAccessFile(touchfile, "rw").getChannel(); lock = channel.lock(); if (touchfile.canRead()) { getLogger().debug("Reading resolution-state from: " + touchfile);
Java - Registered: Sun Apr 28 03:35:10 GMT 2024 - Last Modified: Wed Sep 06 11:28:54 GMT 2023 - 12.1K bytes - Viewed (0) -
.teamcity/.mvn/wrapper/MavenWrapperDownloader.java
} URL website = new URL(urlString); ReadableByteChannel rbc; rbc = Channels.newChannel(website.openStream()); FileOutputStream fos = new FileOutputStream(destination); fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); fos.close(); rbc.close(); }
Java - Registered: Wed Apr 24 11:36:11 GMT 2024 - Last Modified: Wed Feb 26 01:48:39 GMT 2020 - 4.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt
return delegate!!.trafficClass } @Throws(IOException::class) override fun sendUrgentData(value: Int) { delegate!!.sendUrgentData(value) } override fun getChannel(): SocketChannel { return delegate!!.channel } override fun getHandshakeSession(): SSLSession { return delegate!!.handshakeSession } override fun getApplicationProtocol(): String {
Plain Text - Registered: Fri Apr 26 11:42:10 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.9K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/CopyUtil.java
* ファイル出力ストリーム * @return コピーしたバイト数 */ protected static int copyInternal(final FileInputStream in, final FileOutputStream out) { final FileChannel ic = in.getChannel(); final FileChannel oc = out.getChannel(); return (int) ChannelUtil.transfer(ic, oc); } /** * リーダーの内容をライターにコピーします。 * <p> * リーダー、ライターともクローズされません。 * </p> *
Java - Registered: Fri Apr 26 20:58:09 GMT 2024 - Last Modified: Thu Mar 07 01:59:08 GMT 2024 - 52.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteStreamsTest.java
try (FileOutputStream fos = new FileOutputStream(testFile)) { for (int i = 0; i < 500; i++) { fos.write(dummyData); } } try (ReadableByteChannel inChannel = new RandomAccessFile(testFile, "r").getChannel()) { ByteStreams.copy(inChannel, outChannel); } byte[] actual = out.toByteArray(); for (int i = 0; i < 500 * chunkSize; i += chunkSize) {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Files.java
@Override public byte[] read() throws IOException { Closer closer = Closer.create(); try { FileInputStream in = closer.register(openStream()); return ByteStreams.toByteArray(in, in.getChannel().size()); } catch (Throwable e) { throw closer.rethrow(e); } finally { closer.close(); } } @Override public String toString() {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Thu Feb 15 16:12:13 GMT 2024 - 33.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteStreamsTest.java
try (FileOutputStream fos = new FileOutputStream(testFile)) { for (int i = 0; i < 500; i++) { fos.write(dummyData); } } try (ReadableByteChannel inChannel = new RandomAccessFile(testFile, "r").getChannel()) { ByteStreams.copy(inChannel, outChannel); } byte[] actual = out.toByteArray(); for (int i = 0; i < 500 * chunkSize; i += chunkSize) {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 21.9K bytes - Viewed (0) -
maven-core/src/test/resources/org/apache/maven/extension/test-extension-repo/org/apache/maven/wagon/wagon-provider-api/1.0-beta-2/wagon-provider-api-1.0-beta-2.jar
void LazyFileOutputStream(String); public void LazyFileOutputStream(java.io.File); public void close() throws java.io.IOException; public boolean equals(Object); public void flush() throws java.io.IOException; public java.nio.channels.FileChannel getChannel(); public java.io.FileDescriptor getFD() throws java.io.IOException; public int hashCode(); public String toString(); public void write(byte[]) throws java.io.IOException; public void write(byte[], int, int) throws java.io.IOException; public void...
Archive - Registered: Sun Mar 31 03:35:09 GMT 2024 - Last Modified: Tue Oct 16 20:15:40 GMT 2007 - 45.2K bytes - Viewed (0)