The header of could contain characters which are not numbers. Some of them can be translated into bytes. E.g.
char would be two byte.

@param code
the code to look for
@return the size of the given code
493017
public static int stringToByteCount(String code) {
        @SuppressWarnings("serial")
        HashMap<String, Integer> codingMap = new HashMap<String, Integer>() {
            {
                put("b", 1);
                put("byte", 1);
                put("bool", 1);
                put("boolean", 1);
                put("c", 2);
                put("char", 2);
                put("character", 2);
                put("i", 4);
                put("int", 4);
                put("integer", 4);
                put("f", 4);
                put("float", 4);
                put("d", 8);
                put("double", 8);
                put("l", 8);
                put("long", 8);
                put("1", 1);
                put("2", 2);
                put("3", 3);
                put("4", 4);
                put("5", 5);
                put("6", 6);
                put("7", 7);
                put("8", 8);
            }
        };
        if (codingMap.containsKey(code)) {
            return codingMap.get(code.toLowerCase());
        } else {
            return 0;
        }
    }
140566
function toAlpha3(code) {
  if (typeof code === "string") {
    if (/^[0-9]*$/.test(code)) {
      return numericToAlpha3(code);
    }
    if(code.length === 2) {
      return alpha2ToAlpha3(code.toUpperCase());
    }
    if (code.length === 3) {
      return code.toUpperCase();
    }
  }
  if (typeof code === "number") {
    return numericToAlpha3(code);
  }
  return undefined;
}
1130627
public int getWidth(int char1) {
        if (fastWinansi) {
            if (char1 < 128 || (char1 >= 160 && char1 <= 255))
                return widths[char1];
            else
                return widths[PdfEncodings.winansi.get(char1)];
        }
        else {
            int total = 0;
            byte mbytes[] = convertToBytes((char)char1);
            for (int k = 0; k < mbytes.length; ++k)
                total += widths[0xff & mbytes[k]];
            return total;
        }
    }
135722
protected function codePointToChar($code)
    {
        if ($code <= 0x7F) {
            return chr($code);
        } elseif ($code <= 0x7FF) {
            return chr(($code >> 6) + 192) . chr(($code & 63) + 128);
        } elseif ($code <= 0xFFFF) {
            return chr(($code >> 12) + 224) . chr((($code >> 6) & 63) + 128) . chr(($code & 63) + 128);
        } else {
            return chr(($code >> 18) + 240) . chr((($code >> 12) & 63) + 128) . chr((($code >> 6) & 63) + 128) . chr(($code & 63) + 128);
        }
    }
50787
public String readStringLengthEncoded(final Charset charset) {
    int length = (int) getLengthEncodedNumeric();
    String string = new String(buf, position, length, charset);
    position += length;
    return string;
  }
1344629
public Rectangle getBarcodeSize() {
        float fontX = 0;
        float fontY = 0;
        String fCode = code;
        if (extended)
            fCode = getCode39Ex(code);
        if (font != null) {
            if (baseline > 0)
                fontY = baseline - font.getFontDescriptor(BaseFont.DESCENT, size);
            else
                fontY = -baseline + size;
            String fullCode = code;
            if (generateChecksum && checksumText)
                fullCode += getChecksum(fCode);
            if (startStopText)
                fullCode = "*" + fullCode + "*";
            fontX = font.getWidthPoint(altText != null ? altText : fullCode, size);
        }
        int len = fCode.length() + 2;
        if (generateChecksum)
            ++len;
        float fullWidth = len * (6 * x + 3 * x * n) + (len - 1) * x;
        fullWidth = Math.max(fullWidth, fontX);
        float fullHeight = barHeight + fontY;
        return new Rectangle(fullWidth, fullHeight);
    }
63167
public static String getXAExceptionCodeString(int code) {

        // Note, two cases are commented out below.  This is because in the implementation of
        // XAException, they have defined two constants to be the same int (or so it would
        // seem).

        // This is because XA_RBBASE and XA_RBEND define the lower and upper bounds of the
        // XA_RB error codes.  These two are correctly commented out below.

        switch (code) {
            case XAException.XA_RBTRANSIENT:
                return "XA_RBTRANSIENT (" + code + ')'; 
            case XAException.XA_RBROLLBACK:
                return "XA_RBROLLBACK (" + code + ')'; 
            case XAException.XA_HEURCOM:
                return "XA_HEURCOM (" + code + ')'; 
            case XAException.XA_HEURHAZ:
                return "XA_HEURHAZ (" + code + ')'; 
            case XAException.XA_HEURMIX:
                return "XA_HEURMIX (" + code + ')'; 
            case XAException.XA_HEURRB:
                return "XA_HEURRB (" + code + ')'; 
            case XAException.XA_NOMIGRATE:
                return "XA_NOMIGRATE (" + code + ')'; 
                //case XAException.XA_RBBASE:
                //    return "XA_RBBASE (" + code + ')'; 
            case XAException.XA_RBCOMMFAIL:
                return "XA_RBCOMMFAIL (" + code + ')'; 
            case XAException.XA_RBDEADLOCK:
                return "XA_RBDEADLOCK (" + code + ')'; 
                //case XAException.XA_RBEND:
                //    return "XA_RBEND (" + code + ')'; 
            case XAException.XA_RBINTEGRITY:
                return "XA_RBINTEGRITY (" + code + ')'; 
            case XAException.XA_RBOTHER:
                return "XA_RBOTHER (" + code + ')'; 
            case XAException.XA_RBPROTO:
                return "XA_RBPROTO (" + code + ')'; 
            case XAException.XA_RBTIMEOUT:
                return "XA_RBTIMEOUT (" + code + ')'; 
            case XAException.XA_RDONLY:
                return "XA_RDONLY (" + code + ')'; 
            case XAException.XA_RETRY:
                return "XA_RETRY (" + code + ')'; 
            case XAException.XAER_ASYNC:
                return "XAER_ASYNC (" + code + ')'; 
            case XAException.XAER_DUPID:
                return "XAER_DUPID (" + code + ')'; 
            case XAException.XAER_INVAL:
                return "XAER_INVAL (" + code + ')'; 
            case XAException.XAER_NOTA:
                return "XAER_NOTA (" + code + ')'; 
            case XAException.XAER_OUTSIDE:
                return "XAER_OUTSIDE (" + code + ')'; 
            case XAException.XAER_PROTO:
                return "XAER_PROTO (" + code + ')'; 
            case XAException.XAER_RMERR:
                return "XAER_RMERR (" + code + ')'; 
            case XAException.XAER_RMFAIL:
                return "XAER_RMFAIL (" + code + ')'; 

        }
        return "UNKNOWN XA EXCEPTION CODE (" + code + ')'; 
    }
794154
protected boolean parse(HttpCode<TRANS, ?> code, String cntnt) {
		byte bytes[] = cntnt.getBytes();
		
		int cis,cie=-1,cend;
		int sis,sie,send;
		String name;
		ArrayList<String> props = new ArrayList<String>();
		do {
			// Clear these in case more than one Semi
			props.clear(); // on loop, do not want mixed properties
			name=null;
			
			cis = cie+1; // find comma start
			while(cis<bytes.length && Character.isSpaceChar(bytes[cis]))++cis;
			cie = cntnt.indexOf(',',cis); // find comma end
			cend = cie<0?bytes.length:cie; // If no comma, set comma end to full length, else cie
			while(cend>cis && Character.isSpaceChar(bytes[cend-1]))--cend;
			// Start SEMIS
			sie=cis-1; 
			do {
				sis = sie+1;  // semi start is one after previous end
				while(sis<bytes.length && Character.isSpaceChar(bytes[sis]))++sis;	
				sie = cntnt.indexOf(';',sis);
				send = sie>cend || sie<0?cend:sie;  // if the Semicolon is after the comma, or non-existent, use comma end, else keep
				while(send>sis && Character.isSpaceChar(bytes[send-1]))--send;
				if(name==null) { // first entry in Comma set is the name, not a property
					name = new String(bytes,sis,send-sis);
				} else { // We've looped past the first Semi, now process as properties
					// If there are additional elements (more entities within Semi Colons)
					// apply Properties
					int eq = cntnt.indexOf('=',sis);
					if(eq>sis && eq<send) {
						props.add(new String(bytes,sis,eq-sis));
						props.add(new String(bytes,eq+1,send-(eq+1)));
					}
				}
				// End Property
			} while(sie<=cend && sie>=cis); // End SEMI processing
			// Now evaluate Comma set and return if true
			if(eval(code,name,props))return true; // else loop again to check next comma
		} while(cie>=0); // loop to next comma
		return false; // didn't get even one match
	}
142750
public static int indexOfSourceStart( String code ) {
		int state = 0;

		int indexLineStart = 0;
		char previous = 0;
		boolean justEntered = false;

		StringBuilder buffer = new StringBuilder(1024);

		for (int i = 0; i < code.length(); i++) {
			char c = code.charAt(i);

			if( state == 1 ) {
				if( justEntered ) {
					justEntered = false;
					if( c == '*' ) {
						return indexLineStart;
					}
				}
				if( previous == '*' && c == '/') {
					state = 0;
				}
			} else if( state == 0 ){
				if( previous == '/' && c == '/' ) {
					state = 2;
				} else if( previous == '/' && c == '*') {
					state = 1;
					justEntered = true;
				} else {
					buffer.append(c);
				}
			}

			if( c == '\n' ) {
				if( buffer.toString().contains("class")) {
					return indexLineStart;
				}
				buffer.delete(0,buffer.length());
				indexLineStart = i+1;
				if( state == 2 ) {
					state = 0;
				}
			}

			previous = c;
		}
		if( buffer.toString().contains("class")) {
			return indexLineStart;
		} else{
			return 0;
		}
	}
1275787
public static SpdySessionStatus valueOf(int code) {
        switch (code) {
        case 0:
            return OK;
        case 1:
            return PROTOCOL_ERROR;
        case 2:
            return INTERNAL_ERROR;
        }

        return new SpdySessionStatus(code, "UNKNOWN (" + code + ')');
    }
1197127
public static int lengthOfCodePointSafe(Slice utf8, int position)
    {
        int length = lengthOfCodePointFromStartByteSafe(utf8.getByte(position));
        if (length < 0) {
            return -length;
        }

        if (length == 1 || position + 1 >= utf8.length() || !isContinuationByte(utf8.getByteUnchecked(position + 1))) {
            return 1;
        }

        if (length == 2 || position + 2 >= utf8.length() || !isContinuationByte(utf8.getByteUnchecked(position + 2))) {
            return 2;
        }

        if (length == 3 || position + 3 >= utf8.length() || !isContinuationByte(utf8.getByteUnchecked(position + 3))) {
            return 3;
        }

        if (length == 4 || position + 4 >= utf8.length() || !isContinuationByte(utf8.getByteUnchecked(position + 4))) {
            return 4;
        }

        if (length == 5 || position + 5 >= utf8.length() || !isContinuationByte(utf8.getByteUnchecked(position + 5))) {
            return 5;
        }

        if (length == 6) {
            return 6;
        }

        return 1;
    }
358753
private long getFormatId(String formatCode) 
    {
        long ret = 0L;

        if(formatCode != null && formatCode.length() > 0)
        {
            if(numFmts != null)
            {
                Iterator it = numFmts.entrySet().iterator();
                while(it.hasNext() && ret == 0L)
                {
                    java.util.Map.Entry entry = (java.util.Map.Entry)it.next();
                    Long id = (Long)entry.getKey();
                    String code = (String)entry.getValue();
                    if(code != null && code.equals(formatCode))
                        ret = id.longValue();
                }
            }

            // If not found, also search
            //   the built-in formats
            if(ret == 0L)
            {
                Long l = (Long)builtinNumFmts.get(formatCode);
                if(l != null)
                    ret = l.longValue();
            }

            // If still not found, 
            //   create a new format
            if(ret == 0L)
            {
                CTNumFmts numFmts = stylesheet.getNumFmts();
                if(numFmts == null)
                {
                    numFmts = new CTNumFmts();
                    stylesheet.setNumFmts(numFmts);
                }

                List list = numFmts.getNumFmt();
                CTNumFmt numFmt = new CTNumFmt();
                numFmt.setNumFmtId(getMaxNumFmtId()+1);
                numFmt.setFormatCode(formatCode);
                list.add(numFmt);
                numFmts.setCount((long)list.size());
                addFormatCode(numFmt);
                ret = numFmt.getNumFmtId();
            }
        }

        return ret;
    }
336652
private int checkSkipWriteForFixLengthPart(AbstractPagedOutputView out) throws IOException {
		// skip if there is no enough size.
		int available = out.getSegmentSize() - out.getCurrentPositionInSegment();
		if (available < getSerializedRowFixedPartLength()) {
			out.advance();
			return available;
		}
		return 0;
	}
12820
public static String getMessage(int code)
    {
        Code codeEnum = getCode(code);
        if (codeEnum != null)
        {
            return codeEnum.getMessage();
        }
        else
        {
            return Integer.toString(code);
        }
    }
1294427
function _Char_toCode(char)
{
	var code = char.charCodeAt(0);
	if (0xD800 <= code && code <= 0xDBFF)
	{
		return (code - 0xD800) * 0x400 + char.charCodeAt(1) - 0xDC00 + 0x10000
	}
	return code;
}
634155
public void setCode(ExprCode code) {
        mCode = code;

        mStartPos = mCode.mStartPos;
        mCurIndex = mStartPos;
    }
153033
function toknam(code) {
  var keys = Object.keys(C);
  for (var i = 0, l = keys.length; i < l; i++) {
    var key = keys[i];
    if (C[key] === code) { return key; }
  }
  return code && ("0x" + code.toString(16));
}