microsoft-azure-storage/src/com/microsoft/azure/storage/table/TableRequest.java
public static HttpURLConnection batch(final URI rootUri, final TableRequestOptions tableOptions,
            final UriQueryBuilder queryBuilder, final OperationContext opContext, final String batchID)
            throws IOException, URISyntaxException, StorageException {
        final URI queryUri = PathUtility.appendPathToSingleUri(rootUri, "$batch");

        final HttpURLConnection retConnection = BaseRequest.createURLConnection(queryUri, tableOptions, queryBuilder,
                opContext);

        setAcceptHeaderForHttpWebRequest(retConnection, tableOptions.getTablePayloadFormat());
        retConnection.setRequestProperty(Constants.HeaderConstants.CONTENT_TYPE,
                String.format(TableConstants.HeaderConstants.MULTIPART_MIXED_FORMAT, batchID));

        retConnection.setRequestProperty(TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION,
                TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION_VALUE);

        retConnection.setRequestMethod("POST");
        retConnection.setDoOutput(true);
        return retConnection;
    }
public static HttpURLConnection batch(final URI rootUri, final TableRequestOptions tableOptions,
            final UriQueryBuilder queryBuilder, final OperationContext opContext, final String batchID)
            throws IOException, URISyntaxException, StorageException {
        final URI queryUri = PathUtility.appendPathToSingleUri(rootUri, "$batch");

        final HttpURLConnection retConnection = BaseRequest.createURLConnection(queryUri, tableOptions, queryBuilder,
                opContext);

        setAcceptHeaderForHttpWebRequest(retConnection, tableOptions.getTablePayloadFormat());
        retConnection.setRequestProperty(Constants.HeaderConstants.CONTENT_TYPE,
                String.format(TableConstants.HeaderConstants.MULTIPART_MIXED_FORMAT, batchID));

        retConnection.setRequestProperty(TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION,
                TableConstants.HeaderConstants.MAX_DATA_SERVICE_VERSION_VALUE);

        retConnection.setRequestMethod("POST");
        retConnection.setDoOutput(true);
        return retConnection;
    }
Reserved for internal use. Constructs an <code>HttpURLConnection</code> to perform a table batch operation.

@param rootUri
A <code>java.net.URI</code> containing an absolute URI to the resource.
@param tableOptions
A {@link TableRequestOptions} object that specifies execution options such as retry policy and timeout
settings for the operation. This parameter is unused.
@param queryBuilder
The {@link UriQueryBuilder} for the operation.
@param opContext
An {@link OperationContext} object for tracking the current operation. Specify <code>null</code> to
safely ignore operation context.
@param batchID
The <code>String</code> containing the batch identifier.
@return
An <code>HttpURLConnection</code> to use to perform the operation.

@throws IOException
if there is an error opening the connection.
@throws URISyntaxException
if the resource URI is invalid.
@throws StorageException
if a storage service error occurred during the operation.