/* (non-Javadoc)
@see org.opoo.press.Source#getContent()
188121
@Override
    public String getContent() {
        FileReader reader = null;
        try {
            reader = new FileReader(this.contentFile);
            return IOUtils.toString(reader);
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            IOUtils.closeQuietly(reader);
        }
    }
373514
private function getContent()
    {
        if (null === $this->contentCache) {
            $item = $this->getCachedContent();

            if (null === $this->contentCache) {
                $this->contentCache = $this->saveContentInCache($item, $this->readFile());
            }
        }

        return $this->contentCache;
    }
886902
public byte[] getContent() throws TLVParserException {
        byte[] content = this.content;
        if (!children.isEmpty()) {
            for (TLVElement child : children) {
                content = Util.join(content, child.encodeHeader());
                content = Util.join(content, child.getContent());
            }
        }
        return content;
    }
1062532
@Override
    public RetrievedContent getContent(String spaceID,
                                       String contentID,
                                       String storeID,
                                       String range)
        throws InvalidRequestException, ResourceException {
        try {
            StorageProvider storage =
                storageProviderFactory.getStorageProvider(storeID);
            return storage.getContent(spaceID, contentID, range);
        } catch (NotFoundException e) {
            throw new ResourceNotFoundException("get content",
                                                spaceID,
                                                contentID,
                                                e);
        } catch (StorageStateException e) {
            throw new ResourceStateException("get content",
                                             spaceID,
                                             contentID,
                                             e);
        } catch (IllegalArgumentException e) {
            throw new InvalidRequestException(e.getMessage());

        } catch (Exception e) {
            storageProviderFactory.expireStorageProvider(storeID);
            throw new ResourceException("get content", spaceID, contentID, e);
        }
    }
1289866
public String getContentId() {
        String[] values = getMimeHeader("Content-ID");
        if (values != null && values.length > 0)
            return values[0];
        return null;
    }
944831
public String getContent() {
		String content = "";
		
		NodeList list = dom.getChildNodes();
		for (int i=0;i<list.getLength();i++) {
			if (list.item(i) instanceof Text) {
				content += (list.item(i).getNodeValue());
			}
		}
		
		return content;
	}
941191
protected function getContent():string
	{
		if( $this->parent ){
			return $this->execute()->parent->getContent();
		}else{
			return $this->execute()->content;
		}
	}
47606
public String getContentAsString() {
		if (contentAsString == null) {
			contentAsString = new String(rawContent,
					UriComponentEncoder.UTF8_CHARSET);
		}
		return contentAsString;
	}
1148154
@Override
    public String getContentType() {
        ServletRESTRequestImpl ret = castRequest();
        if (ret != null)
            return ret.getContentType();
        return null;
    }
822099
@Override
    public Object getRequestContents() {
        if (this.bodyParameters.size() == 0) {
            return "{}";
        } else {
            String jsonString = "";
            EntityActionBodyParameterMapper mapper = new EntityActionBodyParameterMapper();
            jsonString = mapper.toString(this.bodyParameters);
            return jsonString;
        }
    }
315559
public String getContent() {
        if (content != null) {
            return context != null ? context.replaceDynamicContentInString(content) : content;
        } else if (StringUtils.hasText(getContentResourcePath()) && getContentType().startsWith("text")) {
            try {
                String fileContent = FileUtils.readToString(new PathMatchingResourcePatternResolver().getResource(getContentResourcePath()).getInputStream(), Charset.forName(charsetName));
                return context != null ? context.replaceDynamicContentInString(fileContent) : fileContent;
            } catch (IOException e) {
                throw new CitrusRuntimeException("Failed to read SOAP attachment file resource", e);
            }
        } else {
            try {
                byte[] binaryData = FileCopyUtils.copyToByteArray(getDataHandler().getInputStream());
                if (encodingType.equals(SoapAttachment.ENCODING_BASE64_BINARY)) {
                    return Base64.encodeBase64String(binaryData);
                } else if (encodingType.equals(SoapAttachment.ENCODING_HEX_BINARY)) {
                    return Hex.encodeHexString(binaryData).toUpperCase();
                } else {
                    throw new CitrusRuntimeException(String.format("Unsupported encoding type '%s' for SOAP attachment - choose one of %s or %s",
                            encodingType, SoapAttachment.ENCODING_BASE64_BINARY, SoapAttachment.ENCODING_HEX_BINARY));
                }
            } catch (IOException e) {
                throw new CitrusRuntimeException("Failed to read SOAP attachment data input stream", e);
            }
        }
    }
51072
public static ContentSource getInputContentSource(Configuration conf) 
    throws URISyntaxException, XccConfigException, IOException {
        String host = conf.getStrings(INPUT_HOST)[0];
        if (host == null || host.isEmpty()) {
            throw new IllegalArgumentException(INPUT_HOST + 
                    " is not specified.");
        }
        
        return getInputContentSource(conf, host);
    }
766532
@Override
   public String getContentEncoding()
   {
      try
      {
         if (!connected)
         {
            connect();
         }

         return nodeRepresentation.getContentEncoding();
      }
      catch (Exception e)
      {
         if (LOG.isTraceEnabled())
         {
            LOG.trace("An exception occurred: " + e.getMessage());
         }
      }
      return null;
   }
947070
public String getContent()
    {
        String content = normalizeLineBreaks( text );
        content = removeNonLineBreaks( content );
        content = condenseWhitespace( content );
        content = decodeMarkup( content );
        return content.trim();
    }
390547
public String getContent() {
        if (content != null) {
            return content;
        }

        if (stream != null) {
            Scanner scanner = new Scanner(stream, "UTF-8").useDelimiter("\\A");

            if (!scanner.hasNext()) {
                return "";
            }

            String data = scanner.next();
            scanner.close();

            return data;
        }

        return "";
    }
265052
@Override
    public Content getContent(String key, Object o1, Object o2) {
        return contents.getContent(key, o1, o2);
    }
1088634
@Override
    public Map<ArchivePath, Node> getContent() {
        Map<ArchivePath, Node> ret = new LinkedHashMap<ArchivePath, Node>();
        for (Map.Entry<ArchivePath, NodeImpl> item : content.entrySet()) {
            if (!item.getKey().equals(new BasicPath("/"))) {
                ret.put(item.getKey(), item.getValue());
            }
        }

        return Collections.unmodifiableMap(ret);
    }