/** * {@inheritDoc} */ public InputStream getStream() throws IllegalStateException, RepositoryException { setStreamConsumed(); if (stream == null) { if (getType() == PropertyType.NAME || getType() == PropertyType.PATH) { // needs namespace mapping try { String l_s = getType() == PropertyType.NAME ? resolver.getJCRName(qvalue.getName()) : resolver.getJCRPath(qvalue.getPath()); stream = new ByteArrayInputStream(l_s.getBytes("UTF-8")); } catch (UnsupportedEncodingException ex) { throw new RepositoryException(ex); } } else { stream = qvalue.getStream(); } } return stream; }