In case you need to post from your application and you are using SteemJ for interacting with steem blockchain you can use following function to check if you have bandwidth to post.
/**
* Calculate the bandwidth ratio
* A ratio greater than 1 means the account has bandwidth
*
* @param steemJ
* @param accountName
* @return
* @throws SteemCommunicationException
* @throws SteemResponseException
*/
public static Double getBandwidthRatio(SteemJ steemJ, String accountName) throws Exception {
ExtendedAccount theAccount = getAccountInfo(steemJ, accountName);
Double account_vesting_shares = Double.valueOf(theAccount.getVestingShares().getAmount());
Double account_average_bandwidth = Double.valueOf(theAccount.getAverageBandwidth());
Double total_vesting_shares = Double.valueOf(steemJ.getDynamicGlobalProperties().getTotalVestingShares().getAmount());
Double market_average_bandwidth = Double.valueOf(Long.valueOf(steemJ.getDynamicGlobalProperties().getMaxVirtualBandwidth()));
return (account_vesting_shares * market_average_bandwidth) / (account_average_bandwidth * total_vesting_shares);
}