Java源码示例:com.sun.xml.internal.ws.encoding.xml.XMLMessage.MessageDataSource
示例1
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例2
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例3
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例4
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例5
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例6
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例7
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例8
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例9
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例10
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例11
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例12
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例13
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例14
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例15
@Override
public ContentType getStaticContentType(Packet packet) {
ContentType ct;
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource()) {
ct = getStaticContentType(mds);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
}
ct = super.getStaticContentType(packet);
return (ct != null)
? setAcceptHeader(packet, ct) //_adaptingContentType.set(packet, ct)
: null;
}
示例16
private ContentType encode(MessageDataSource mds, OutputStream out) {
try {
final boolean isFastInfoset = XMLMessage.isFastInfoset(
mds.getDataSource().getContentType());
DataSource ds = transformDataSource(mds.getDataSource(),
isFastInfoset, useFastInfosetForEncoding, features);
InputStream is = ds.getInputStream();
byte[] buf = new byte[1024];
int count;
while((count=is.read(buf)) != -1) {
out.write(buf, 0, count);
}
return new ContentTypeImpl(ds.getContentType());
} catch(IOException ioe) {
throw new WebServiceException(ioe);
}
}
示例17
@Override
public ContentType encode(Packet packet, OutputStream out) throws IOException {
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource())
return setAcceptHeader(packet, encode(mds, out));
}
return setAcceptHeader(packet, super.encode(packet, out));
}
示例18
private ContentType getStaticContentType(MessageDataSource mds) {
final String contentType = mds.getDataSource().getContentType();
final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
if (!requiresTransformationOfDataSource(isFastInfoset,
useFastInfosetForEncoding)) {
return new ContentTypeImpl(contentType);
} else {
return null;
}
}
示例19
@Override
public ContentType encode(Packet packet, OutputStream out) throws IOException {
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource())
return setAcceptHeader(packet, encode(mds, out));
}
return setAcceptHeader(packet, super.encode(packet, out));
}
示例20
private ContentType getStaticContentType(MessageDataSource mds) {
final String contentType = mds.getDataSource().getContentType();
final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
if (!requiresTransformationOfDataSource(isFastInfoset,
useFastInfosetForEncoding)) {
return new ContentTypeImpl(contentType);
} else {
return null;
}
}
示例21
@Override
public ContentType encode(Packet packet, OutputStream out) throws IOException {
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource())
return setAcceptHeader(packet, encode(mds, out));
}
return setAcceptHeader(packet, super.encode(packet, out));
}
示例22
private ContentType getStaticContentType(MessageDataSource mds) {
final String contentType = mds.getDataSource().getContentType();
final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
if (!requiresTransformationOfDataSource(isFastInfoset,
useFastInfosetForEncoding)) {
return new ContentTypeImpl(contentType);
} else {
return null;
}
}
示例23
@Override
public ContentType encode(Packet packet, OutputStream out) throws IOException {
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource())
return setAcceptHeader(packet, encode(mds, out));
}
return setAcceptHeader(packet, super.encode(packet, out));
}
示例24
private ContentType getStaticContentType(MessageDataSource mds) {
final String contentType = mds.getDataSource().getContentType();
final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
if (!requiresTransformationOfDataSource(isFastInfoset,
useFastInfosetForEncoding)) {
return new ContentTypeImpl(contentType);
} else {
return null;
}
}
示例25
@Override
public ContentType encode(Packet packet, OutputStream out) throws IOException {
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource())
return setAcceptHeader(packet, encode(mds, out));
}
return setAcceptHeader(packet, super.encode(packet, out));
}
示例26
private ContentType getStaticContentType(MessageDataSource mds) {
final String contentType = mds.getDataSource().getContentType();
final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
if (!requiresTransformationOfDataSource(isFastInfoset,
useFastInfosetForEncoding)) {
return new ContentTypeImpl(contentType);
} else {
return null;
}
}
示例27
@Override
public ContentType encode(Packet packet, OutputStream out) throws IOException {
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource())
return setAcceptHeader(packet, encode(mds, out));
}
return setAcceptHeader(packet, super.encode(packet, out));
}
示例28
private ContentType getStaticContentType(MessageDataSource mds) {
final String contentType = mds.getDataSource().getContentType();
final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
if (!requiresTransformationOfDataSource(isFastInfoset,
useFastInfosetForEncoding)) {
return new ContentTypeImpl(contentType);
} else {
return null;
}
}
示例29
@Override
public ContentType encode(Packet packet, OutputStream out) throws IOException {
if (packet.getInternalMessage() instanceof MessageDataSource) {
final MessageDataSource mds = (MessageDataSource)packet.getInternalMessage();
if (mds.hasUnconsumedDataSource())
return setAcceptHeader(packet, encode(mds, out));
}
return setAcceptHeader(packet, super.encode(packet, out));
}
示例30
private ContentType getStaticContentType(MessageDataSource mds) {
final String contentType = mds.getDataSource().getContentType();
final boolean isFastInfoset = XMLMessage.isFastInfoset(contentType);
if (!requiresTransformationOfDataSource(isFastInfoset,
useFastInfosetForEncoding)) {
return new ContentTypeImpl(contentType);
} else {
return null;
}
}