public ProtocolInfo(MimeType contentFormatMimeType) { this.protocol = Protocol.HTTP_GET; this.contentFormat = contentFormatMimeType.toString(); }
public String getString() { return getValue().toString(); }
public AddMessage(Service service, Message message) { super(new ActionInvocation(service.getAction("AddMessage"))); getActionInvocation().setInput("MessageID", Integer.toString(message.getId())); getActionInvocation().setInput("MessageType", mimeType.toString()); getActionInvocation().setInput("Message", message.toString()); }
public ProtocolInfo(MimeType contentFormatMimeType) { this.protocol = Protocol.HTTP_GET; this.contentFormat = contentFormatMimeType.toString(); }
: "UTF-8"; setRequestContentType(contentType.toString()); ByteArrayBuffer buffer; try { MimeType contentType = getRequestMessage().getContentTypeHeader().getValue(); setRequestContentType(contentType.toString()); ByteArrayBuffer buffer; buffer = new ByteArrayBuffer(getRequestMessage().getBodyBytes());
public String getString() { return getValue().toString(); }
public AddMessage(Service service, Message message) { super(new ActionInvocation(service.getAction("AddMessage"))); getActionInvocation().setInput("MessageID", Integer.toString(message.getId())); getActionInvocation().setInput("MessageType", mimeType.toString()); getActionInvocation().setInput("Message", message.toString()); }
public ProtocolInfo(MimeType contentFormatMimeType) { this.protocol = Protocol.HTTP_GET; this.contentFormat = contentFormatMimeType.toString(); }
: "UTF-8"; setRequestContentType(contentType.toString()); ByteArrayBuffer buffer; try { MimeType contentType = getRequestMessage().getContentTypeHeader().getValue(); setRequestContentType(contentType.toString()); ByteArrayBuffer buffer; buffer = new ByteArrayBuffer(getRequestMessage().getBodyBytes());
public String getString() { return getValue().toString(); }
public AddMessage(Service service, Message message) { super(new ActionInvocation(service.getAction("AddMessage"))); getActionInvocation().setInput("MessageID", Integer.toString(message.getId())); getActionInvocation().setInput("MessageType", mimeType.toString()); getActionInvocation().setInput("Message", message.toString()); }
@Override public Response serve(IHTTPSession session) { String itemId = session.getUri().replaceFirst("/", ""); itemId = URLDecoder.decode(itemId); if (itemId != null && ContentTree.hasNode(itemId)) { ContentNode node = ContentTree.getNode(itemId); if (node.isItem()) { String localPath = node.getFullPath(); Long fileSize = node.getItem().getFirstResource().getSize(); String mimeType = node.getItem().getFirstResource() .getProtocolInfo().getContentFormatMimeType().toString(); return responseFile(mimeType, localPath, fileSize); } } Log.d(TAG, " response error!"); String msg = "<html><body><h1>Error</h1>\n" + "</body></html>\n"; return newFixedLengthResponse(msg); }
: "UTF-8"; setRequestContentType(contentType.toString()); ByteArrayBuffer buffer; try { MimeType contentType = getRequestMessage().getContentTypeHeader().getValue(); setRequestContentType(contentType.toString()); ByteArrayBuffer buffer; buffer = new ByteArrayBuffer(getRequestMessage().getBodyBytes());