Returns the number of free bytes remaining in the file associated with this
LogFileHandle instance.

@return long The number of free bytes remaining.
11204
public int freeBytes()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "freeBytes", this);

        int freeBytes = 0;

        try
        {
            int currentCursorPosition = _fileBuffer.position();
            int fileLength = _fileBuffer.capacity();

            freeBytes = fileLength - currentCursorPosition;

            if (freeBytes < 0)
            {
                freeBytes = 0;
            }
        } catch (Throwable exc)
        {
            FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.LogFileHandle.freeBytes", "956", this);
            freeBytes = 0;
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "freeBytes", new Integer(freeBytes));

        return freeBytes;
    }
635536
public long getUsed() throws IOException{
    long used = 0;
    FileStatus[] files = listStatus(new Path("/"));
    for(FileStatus file:files){
      used += file.getLen();
    }
    return used;
  }
226011
protected long calculateContentLength() {

        int result = 0;
        for (CmsFileInfo file : getFilesToUpload().values()) {
            result += file.getFileSize();
        }
        return new Long(result).longValue();
    }
717081
public Long getFileCountAvg() {
        Long fileCountAvg = 0L;
        if (items.size() != 0) {
            for (TableStat item : items) {
                if (item.getEndTime().equals(item.getStartTime())) {
                    fileCountAvg += item.getFileCount();
                } else {
                    fileCountAvg += item.getFileCount() * 1000
                                    / (item.getEndTime().getTime() - item.getStartTime().getTime());
                }
            }
            fileCountAvg = fileCountAvg / items.size();
        }
        return fileCountAvg;
    }
521021
public long getLastModified() {
        if(matchedEntry != null){
            return matchedEntry.getLastModified();
        } else if (matchedZipFile != null){
            return matchedZipFile.getLastModified();
        } else if (matchedFile != null){
            return matchedFile.lastModified();
        } else {
            return 0;
        }
    }
281681
public int freeMemory() {
        int size = 0;
        for (int m = 0; m < memory.length; m++) {
            size += memory[m].length;
            memory[m] = null;
        }
        memory = null;
        return size;
    }
228736
public int getLength() {
        if (m_last == -1) {
            int node;
            while ((node = m_iter.next()) != DTMAxisIterator.END) {
                m_cachedNodes.addElement(node);
            }
            m_last = m_cachedNodes.size();
        }
        return m_last;
    }
42014
public long countClearBits() throws IOException {
        byte[] temp;
        long size = mFile.size();
        if (size > 1024) {
            temp = new byte[1024];
        }
        else {
            temp = new byte[(int)size];
        }

        long pos = 0;
        long count = 0;
        try {
            lock().acquireReadLock();
            while (true) {
                int amt = mFile.read(pos, temp, 0, temp.length);
                if (amt <= 0) {
                    break;
                }
                for (int i=0; i<amt; i++) {
                    byte val = temp[i];
                    switch (val & 15) {
                    case 0: count += 4; break;
                    case 1: case 2: case 4: case 8: count += 3; break;
                    case 3: case 5: case 6: case 9: case 10: case 12:
                        count += 2; break;
                    case 7: case 11: case 13: case 14: count++; break;
                    default: break;
                    }
                    switch ((val >> 4) & 15) {
                    case 0: count += 4; break;
                    case 1: case 2: case 4: case 8: count += 3; break;
                    case 3: case 5: case 6: case 9: case 10: case 12:
                        count += 2; break;
                    case 7: case 11: case 13: case 14: count++; break;
                    default: break;
                    }
                }
                pos += amt;
            }
        }
        catch (InterruptedException e) {
            throw new InterruptedIOException();
        }
        finally {
            lock().releaseLock();
        }
        return count;
    }
774407
protected static Long getUnusedInternalStorage() {
        try {
            File path = Environment.getDataDirectory();
            StatFs stat = new StatFs(path.getPath());
            long blockSize = stat.getBlockSize();
            long availableBlocks = stat.getAvailableBlocks();
            return availableBlocks * blockSize;
        } catch (Exception e) {
            Log.e(TAG, "Error getting unused internal storage amount.", e);
            return null;
        }
    }
1364118
private long getTotalUploadSize() throws IOException {
        long size = 0;
        for (Map.Entry<String, File> entry : files.entrySet()) {
            size += entry.getValue().length();
        }

        for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) {
            size += entry.getValue().available();
        }
        return size;
    }
1026783
public int available() throws IOException {
        checkForClosed();
        return (int) Math.min(_file.length() - _offset + bytesLeftInBuffer(), Integer.MAX_VALUE);
    }
246400
@Nonnegative
  public long getSize ()
  {
    if (m_nSize >= 0)
      return m_nSize;
    if (m_aCachedContent != null)
      return m_aCachedContent.length;
    if (m_aDFOS.isInMemory ())
      return m_aDFOS.getDataLength ();
    return m_aDFOS.getFile ().length ();
  }
427025
static long getFreeSpace(final File fileInFs) {
		try {
			long result = (long) getInstance().doPrivileged(new PrivilegedAction<Long>() {
				public Long run() {
					return fileInFs.getFreeSpace() ;
				}
			});
			return result ;
		} catch (SecurityException se) {
			return -1 ;
		}
	}
522055
long getLogDiskFreeSpace() throws IOException {
    String logDir = fConf.getLogDir();
    // If the log disk is not specified we assume it is usable.
    if (logDir == null) {
      return Long.MAX_VALUE;
    }
    DF df = localDirsDf.get(logDir);
    if (df == null) {
      df = new DF(new File(logDir), fConf);
      localDirsDf.put(logDir, df);
    }
    return df.getAvailable();
  }
1044342
public int getContentLength() {
        if (WCCustomProperties.CHECK_REQUEST_OBJECT_IN_USE){
            checkRequestObjectInUse();
        }
        // 321485
        // PK57679 Start
        int contentLength;
        if (!_setInputDataStreamCalled) // 516233
            contentLength = this._request.getContentLength();
        else
            contentLength = (int)_setInputStreamContentLength;
        // PK57679 End
        if (TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) {  //306998.15
            logger.logp(Level.FINE, CLASS_NAME,"getContentLength", "this->"+this+": "+" length --> " + String.valueOf(contentLength));
        }
        return contentLength;
    }
835333
protected long getLogSpaceReserved() {
        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.entry(this, cclass
                        , "getLogSpaceReserved"
                          + ")");

        if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
            trace.exit(this, cclass
                       , "getLogSpaceReserved"
                       , "returns logSpaceReserved=" + logSpaceReserved + "(long)"
                            );
        return logSpaceReserved;
    }
1272253
public Long getFileNumber() {
        Long fileNumber = 0L;
        if (items.size() != 0) {
            for (TableStat item : items) {
                fileNumber += item.getFileCount();
            }
        }
        return fileNumber;
    }