Initial commit from SVN.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.foundation.web;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
import com.foundation.web.interfaces.IMimeType;
|
||||
import com.foundation.web.interfaces.IMimeTypeProvider;
|
||||
|
||||
/**
|
||||
* Used to wrapper JSON content for a response to the web browser.
|
||||
*/
|
||||
public class JsonContent extends HtmlContent {
|
||||
/**
|
||||
* JsonContent constructor.
|
||||
* @param content
|
||||
*/
|
||||
public JsonContent(ByteBuffer content) {
|
||||
super(content);
|
||||
}//JsonContent()//
|
||||
/**
|
||||
* JsonContent constructor.
|
||||
* @param content
|
||||
*/
|
||||
public JsonContent(String content) {
|
||||
super(content);
|
||||
}//JsonContent()//
|
||||
/* (non-Javadoc)
|
||||
* @see com.foundation.web.HtmlContent#getMimeType(com.foundation.web.interfaces.IMimeTypeProvider)
|
||||
*/
|
||||
public IMimeType getMimeType(IMimeTypeProvider provider) {
|
||||
return provider.getMimeType("json");
|
||||
}//getMimeType()//
|
||||
}//JsonContent//
|
||||
Reference in New Issue
Block a user