Beispiel #1
0
 @Override
 public long getSize() {
   try {
     return m_value.getLength();
   } catch (IOException e) {
     return -1;
   }
 }
Beispiel #2
0
 @Override
 public InputStream getStream() throws IllegalStateException, RepositoryException {
   checkStream();
   try {
     return m_value.getStream();
   } catch (IOException e) {
     throw new IllegalStateException("Stream read error:" + e.getMessage());
   }
 }
Beispiel #3
0
  @Override
  public String getString() throws ValueFormatException {
    checkStream();

    String res;
    try {
      res = FileUtil.readContents(m_value.getStream(), "UTF-8");
    } catch (IOException e) {
      throw new ValueFormatException("Stream cannot be interpreted in UTF-8");
    }

    return res;
  }
Beispiel #4
0
 public long getLength() throws IOException {
   return m_value.getLength();
 }