### Question:
DefaultFileContent implements FileContent { @Override public long getSize() throws FileSystemException { if (!fileObject.getType().hasContent()) { throw new FileSystemException("vfs.provider/get-size-not-file.error", fileObject); } try { return fileObject.doGetContentSize(); } catch (final Exception exc) { throw new FileSystemException("vfs.provider/get-size.error", exc, fileObject); } } DefaultFileContent(final AbstractFileObject file, final FileContentInfoFactory fileContentInfoFactory); @Override FileObject getFile(); @Override long getSize(); @Override long getLastModifiedTime(); @Override void setLastModifiedTime(final long modTime); @Override boolean hasAttribute(final String attrName); @Override Map<String, Object> getAttributes(); void resetAttributes(); @Override String[] getAttributeNames(); @Override Object getAttribute(final String attrName); @Override void setAttribute(final String attrName, final Object value); @Override void removeAttribute(final String attrName); @Override Certificate[] getCertificates(); @Override InputStream getInputStream(); @Override InputStream getInputStream(final int bufferSize); @Override RandomAccessContent getRandomAccessContent(final RandomAccessMode mode); @Override OutputStream getOutputStream(); @Override OutputStream getOutputStream(final boolean bAppend); @Override OutputStream getOutputStream(final int bufferSize); @Override OutputStream getOutputStream(final boolean bAppend, final int bufferSize); @Override void close(); @Override boolean isOpen(); boolean isOpenGlobal(); @Override FileContentInfo getContentInfo(); @Override long write(final FileContent fileContent); @Override long write(final FileObject file); @Override long write(final OutputStream output); @Override long write(final OutputStream output, final int bufferSize);  }### Answer:
@Test public void testGetZeroContents() throws IOException { final FileSystemManager fsManager = VFS.getManager(); try (final FileObject fo = fsManager.resolveFile(new File("."), "src/test/resources/test-data/size-0-file.bin"); final FileContent content = fo.getContent()) { Assert.assertEquals(0, content.getSize()); Assert.assertTrue(content.isEmpty()); Assert.assertEquals(StringUtils.EMPTY, content.getString(StandardCharsets.UTF_8)); Assert.assertEquals(StringUtils.EMPTY, content.getString(StandardCharsets.UTF_8.name())); Assert.assertArrayEquals(ArrayUtils.EMPTY_BYTE_ARRAY, content.getByteArray()); } }