Java Code Examples for org.apache.flink.util.IOUtils#readFully()
The following examples show how to use
org.apache.flink.util.IOUtils#readFully() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RocksDBStateUploaderTest.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
private void assertStateContentEqual(Path stateFilePath, FSDataInputStream inputStream) throws IOException { byte[] excepted = Files.readAllBytes(Paths.get(stateFilePath.toUri())); byte[] actual = new byte[excepted.length]; IOUtils.readFully(inputStream, actual, 0, actual.length); assertEquals(-1, inputStream.read()); assertArrayEquals(excepted, actual); }
Example 2
Source File: RocksDBStateUploaderTest.java From flink with Apache License 2.0 | 5 votes |
private void assertStateContentEqual(Path stateFilePath, FSDataInputStream inputStream) throws IOException { byte[] excepted = Files.readAllBytes(Paths.get(stateFilePath.toUri())); byte[] actual = new byte[excepted.length]; IOUtils.readFully(inputStream, actual, 0, actual.length); assertEquals(-1, inputStream.read()); assertArrayEquals(excepted, actual); }
Example 3
Source File: RocksDBStateUploaderTest.java From flink with Apache License 2.0 | 5 votes |
private void assertStateContentEqual(Path stateFilePath, FSDataInputStream inputStream) throws IOException { byte[] excepted = Files.readAllBytes(stateFilePath); byte[] actual = new byte[excepted.length]; IOUtils.readFully(inputStream, actual, 0, actual.length); assertEquals(-1, inputStream.read()); assertArrayEquals(excepted, actual); }
Example 4
Source File: StringWriterTest.java From flink with Apache License 2.0 | 4 votes |
private void readFully(InputStream in, byte[] buffer) throws IOException { IOUtils.readFully(in, buffer, 0, buffer.length); }
Example 5
Source File: RecoverableMultiPartUploadImplTest.java From flink with Apache License 2.0 | 4 votes |
private byte[] getFileContentBytes(File file, int length) throws IOException { final byte[] content = new byte[length]; IOUtils.readFully(new FileInputStream(file), content, 0, length); return content; }
Example 6
Source File: StringWriterTest.java From flink with Apache License 2.0 | 4 votes |
private void readFully(InputStream in, byte[] buffer) throws IOException { IOUtils.readFully(in, buffer, 0, buffer.length); }
Example 7
Source File: RecoverableMultiPartUploadImplTest.java From flink with Apache License 2.0 | 4 votes |
private byte[] getFileContentBytes(File file, int length) throws IOException { final byte[] content = new byte[length]; IOUtils.readFully(new FileInputStream(file), content, 0, length); return content; }