Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 92 → Rev 91

/xservices/trunk/src/java/net/brutex/xservices/ws/rs/FileInfo.java
File deleted
Property changes:
Deleted: svn:mime-type
-text/plain
\ No newline at end of property
/xservices/trunk/src/java/net/brutex/xservices/ws/rs/FileInfoImpl.java
File deleted
Property changes:
Deleted: svn:mime-type
-text/plain
\ No newline at end of property
/xservices/trunk/src/java/net/brutex/xservices/ws/rs/FileListType.java
File deleted
Property changes:
Deleted: svn:mime-type
-text/plain
\ No newline at end of property
/xservices/trunk/src/java/net/brutex/xservices/ws/impl/FileServiceImpl.java
15,7 → 15,6
*/
package net.brutex.xservices.ws.impl;
 
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
156,27 → 155,7
throw new XServicesFault(e);
}
}
public byte[] encodeFile(FileResource res) throws XServicesFault {
InputStream is = null;
try {
is = res.getAntResource(null).getInputStream();
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
 
int nRead;
byte[] data = new byte[4096];
while ((nRead = is.read(data, 0, data.length)) != -1) {
buffer.write(data, 0, nRead);
}
buffer.flush();
return buffer.toByteArray();
} catch (IOException e) {
throw new XServicesFault(e);
}
}
 
/*
* (non-Javadoc)
*
/xservices/trunk/src/java/net/brutex/xservices/ws/FileService.java
51,7 → 51,6
 
final String OPERATION_BASENAME ="basename";
final String OPERATION_DOWNLOADFILE ="downloadFile";
final String OPERATION_ENCODEFILE= "encodeFile";
final String OPERATION_UPLOADFILE ="uploadFile";
final String OPERATION_COPY ="copy";
final String OPERATION_COPYFILE ="copyFile";
91,16 → 90,6
@WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault;
/**
* @param res
* @return Encodes a file
* @throws XServicesFault
*/
@WSDLDocumentation(XServicesDocumentation.SERVICE_OPERATION_ENCODEFILE)
@WebMethod(operationName = OPERATION_ENCODEFILE)
public abstract byte[] encodeFile(
@WebParam(name = FileResource.XML_NAME) FileResource res) throws XServicesFault;
/**
* @param file
* @return The file name of the file that has been uploaded.
* @throws XServicesFault