Java Long to longToDB(long val)

Here you can find the source of longToDB(long val)

Description

long To DB

License

Open Source License

Declaration

public static String longToDB(long val) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by

public class Main {
    public static String longToDB(long val) {
        String s = Long.toString(val);
        // prefix with 2 digits that represents
        // the length of the value
        int l = s.length();
        String dbVal = "";

        if (s.length() < 10) {
            dbVal = "0";
        }/* ww  w .  j a  v a2s.  c  o m*/
        return dbVal + Integer.toString(l) + s;
    }
}

Related

  1. LongToBuf4(long val, byte[] buf, int offset)
  2. longToBuffer(long l, byte[] ioBuffer)
  3. longToCharArray(long seat, int length)
  4. longToCharBounds(long value)
  5. longToCompare(Long value)
  6. longToEightBytes(final long value)
  7. longToFourBytes(long value)
  8. longToFrontInt(long data)
  9. longToLex(long v)