01: /*
02: * Copyright Aduna (http://www.aduna-software.com/) (c) 1997-2006.
03: *
04: * Licensed under the Aduna BSD-style license.
05: */
06: package org.openrdf.http.webclient.repository.modify.add;
07:
08: import java.io.ByteArrayInputStream;
09: import java.io.IOException;
10: import java.io.InputStream;
11:
12: /**
13: * @author Herko ter Horst
14: */
15: public class RDFTextUpload extends RDFUpload {
16:
17: private String contents;
18:
19: public String getContents() {
20: return contents;
21: }
22:
23: public void setContents(String contents) {
24: this .contents = contents;
25: }
26:
27: @Override
28: public InputStream getInputStream() throws IOException {
29: return new ByteArrayInputStream(contents.getBytes(getFormat()
30: .getCharset().name()));
31: }
32:
33: @Override
34: public String getI18n() {
35: return "repository.modify.add.text.success";
36: }
37: }
|