@Override public Object unwrap(Value value) throws RepositoryException { return value.getStream(); } @Override
@Override public InputStream getValue(Value value) throws RepositoryException { return value.getStream(); } };
@Override public Object unwrap(Value value) throws RepositoryException { return value.getStream(); } @Override
@Override public Object unwrap(Value value) throws RepositoryException { return value.getStream(); } @Override
@SuppressWarnings("deprecation") @Override @NotNull public InputStream getStream() throws RepositoryException { return getValue().getStream(); }
public InputStream getStream() throws ValueFormatException, RepositoryException { if (values.length > 1) { throw new ValueFormatException(); } return values[0].getStream(); }
/** Actually retrieves the input stream from the underlying JCR Value */ private InputStream getStream() throws IOException { if (delegatee == null) { try { delegatee = value.getStream(); } catch (RepositoryException re) { throw (IOException) new IOException(re.getMessage()).initCause(re); } } return delegatee; }
/** * @see Property#getStream() */ public InputStream getStream() throws ValueFormatException, RepositoryException { return getValue().getStream(); }
/** * Returns the binary value of this property. Implemented as * getValue().getStream(). * * {@inheritDoc} */ @SuppressWarnings("deprecation") public InputStream getStream() throws RepositoryException { return getValue().getStream(); }
@SuppressWarnings("deprecation") @Override @NotNull public InputStream getStream() throws RepositoryException { return getValue().getStream(); }
/** * @see Property#getStream() */ public InputStream getStream() throws ValueFormatException, RepositoryException { return getValue().getStream(); }
@Override @SuppressWarnings("deprecation") public InputStream getStream() throws RepositoryException { return internalGetValue().getStream(); }
/** * Returns the binary value of this property. * <p> * The default implementation forwards the method call to the * {@link Value} instance returned by the generic * {@link Property#getValue()} method. * * @return binary value * @throws RepositoryException if an error occurs */ public InputStream getStream() throws RepositoryException { return getValue().getStream(); }
@SuppressWarnings("deprecation") @Override @Nonnull public InputStream getStream() throws RepositoryException { return getValue().getStream(); }
@SuppressWarnings("deprecation") @Override public InputStream getStream() throws ValueFormatException, RepositoryException { return getValue().getStream(); }
/** * Returns the binary value of this property. * <p> * The default implementation forwards the method call to the * {@link Value} instance returned by the generic * {@link Property#getValue()} method. * * @return binary value * @throws RepositoryException if an error occurs */ public InputStream getStream() throws RepositoryException { return getValue().getStream(); }
public InputStream execute() throws Exception { return getDelegate().getStream(); } });
/** * Returns the binary value of this property. * <p> * The default implementation forwards the method call to the * {@link Value} instance returned by the generic * {@link Property#getValue()} method. * * @return binary value * @throws RepositoryException if an error occurs */ public InputStream getStream() throws RepositoryException { return getValue().getStream(); }
private void assertOpen() throws IOException { if (stream == null) { if (closed) { throw new IOException("Stream already closed."); } try { stream = getValue().getStream(); } catch (RepositoryException e) { throw new IOException("Error while opening stream: " + e.toString()); } } } public int read() throws IOException {
public void testGetStreamFromValue() throws RepositoryException, IOException { Value v = superuser.getValueFactory().createValue("/a/b/c", PropertyType.PATH); InputStream in = v.getStream(); ByteArrayOutputStream out = new ByteArrayOutputStream(); IOUtils.copy(in, out); IOUtils.closeQuietly(in); assertEquals(prop.getString(), new String(out.toByteArray(), "UTF-8")); } }