@Override
    public long length() throws IOException
    {
        checkClosed();
        return size;
    }
@Test
    void testPDFBOX5111() throws IOException, URISyntaxException
    {
        try (InputStream is = new URI(
                "https://issues.apache.org/jira/secure/attachment/13017227/stringwidth.pdf")
                        .toURL().openStream();
             RandomAccessReadBuffer randomAccessSource = new RandomAccessReadBuffer(is))
        {
            assertEquals(34060, randomAccessSource.length());
        }
    }